Loading ...

Wait Cursor for long operations

Who is online?  0 guests and 0 members
home  »  forums   »  asp.net topics   »  getting started / general asp.net   » Wait Cursor for long operations

Wait Cursor for long operations

Posts under the topic: Wait Cursor for long operations

This Topic is locked

Posted: 8/16/2011

Lurker 55  points  Lurker
  • Joined on: 7/14/2011
  • Posts: 7

I am attempting to use a wait cursor in a Windows Forms Application. I can get the wait cursor property to work fine if I call it from a Windows Form class, but it does not work properly when I call it from a code class. Here are two types of calls I have attempted to make:

Application.UseWaitCursor = True
Main.UseWaitCursor = True

Basically, my program calls a few code classes to load a bunch of data, and along the way these code classes have to show pop-ups to prompt the user for any missing values. So, at some points in the code I would like to tell the main form to show the wait cursor. Hence, the Main.UseWaitCursor = true. However, the main cursor does not change until the application is done loading the data. I have tried forcing a refresh to the main form, but to no avail.

Please help!


Posted: 8/16/2011

Lurker 55  points  Lurker
  • Joined on: 7/14/2011
  • Posts: 7

Finally figured this out. I used the following code and it worked fine.

'Apply the Wait Cursor
Cursor.Current = Cursors.WaitCursor

 

 


Page 1 of 1 (2 items)