Saturday, 15 May 2010

winforms - C# WaitCursor while form loads -


I am getting a form that takes seconds to display at the end. This form is called:

 using  (result frm = new result ()) {this.Visible = false; Frm.ShowDialog (); This.Visible = True; }  

It's useful to let me see the default cursor as cursor. VAT Kaiser is available, while waiting for the form to display at the end. Currently I am able to successfully do this using the stable 'current' property:

 using  (result frm = new ResultsForm ()) {//this.visible = false; Cursor Current = cursor Wait cursor; Frm.ShowDialog (); //this.Visible = true; }  

But it has two problems:

  • This forces me to disable the mainstream hide-ins feature which I would like to maintain.
  • This increases the coupling after the cursor. Current = cursor Default; is to be called within the event shown as a result.

How can I change the cursor during the form before replacing the code snippet and avoiding coupling while loading without loading?

Update: The question was answered now, the video presentation was removed so I do not go to my ISP bandwidth limits

Why you have to remove it. View = false? You should still be able to do this while determining the cursor.

What would be an acceptable solution to set the cursor instead of the parents? Get it to set the cursor before starting the code which takes all the time, then set it back to the end.


No comments:

Post a Comment