[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Event that occurs when a nonmodal form is completly loaded and shown

Posted on 2003-11-14
2
Medium Priority
?
404 Views
Last Modified: 2010-04-16
Hi,

i need an event, that occurs when a nonmodal form is COMPLETLY loaded and shown to the user, that means that the user can use the form immediatly.
I set the Cursor to WAITCURSOR and create the form when the user hits a node on a treeview. Then, when the form is shown , i need an event thet resets the WaitCursor to Default. I need this,because i dont want that the user thinks he hasn't hit the node and repeats to click on it. The form uses database access and crystal reports so it takes a few seconds (especially on older pcs) until the form appears.
I tried quite all possible events of the form (Load, Activated, GotFocus...) but they all reset the Cursor to early (the form appeard not jet).

Thanks in advance for any help!

frave
0
Comment
Question by:frave
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 10

Expert Comment

by:ptmcomp
ID: 9749145
I think you have to use the Application.Idle

Do something like this:

private EventHandler EventHandler formReadyHandler;
....
public void ShowAForm()
{
    formReadyHandler = new EventHandler(Form_Ready);
    Applicaton.Idle += formReadyHandler;
    AForm.Show();
}

private void Form_Ready(object sender, EventArgs e)
{
    Applicaton.Idle -= formReadyHandler;
    // form is ready
}
0
 
LVL 3

Accepted Solution

by:
Sijin earned 500 total points
ID: 9753587
Form.Load is the last event to to be fired before the form is shown, why not set this.Cursor = Cursors.Default as the last line of this event?

0

Featured Post

What’s Wrong with Your Cloud Strategy ?

Even as many CIOs are embracing a cloud-first strategy, the reality is that moving to the cloud is a lengthy process and the end-state is likely to be a blend of multiple clouds—public and private. Learn why multicloud solutions matter in this webinar by Nimble Storage.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question