Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show hourglass.

Status
Not open for further replies.

kwalters135

Programmer
Joined
Dec 29, 2005
Messages
48
Location
US
Hello. I'm just trying to change the cursor to an hourglass before the program starts a long process. The problem is that there is a delay (longer on slower machines) before the hourglass is shown. I've tried executing an application.doevents statement, but this does not help. I'm obviously missing something that has changed with .Net. I'm running VS .Net 2005 on Win XP SP2.

Here is my code for the hourglass:

Me.Cursor = Cursors.WaitCursor
Application.DoEvents()

Thanks for any help.
 
You might want to try moving the long process into a different thread. That should free up the primary thread to maintain the GUI and keep the mouse cursor properly displayed.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top