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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cursor prematurely flipping back to Default cursor

Status
Not open for further replies.

DotNetter

Programmer
May 19, 2005
194
US
I have a sub that changes the cursor using:[tt]
Cursor = Cursors.WaitCursor[/tt]

Later in the code, I use:[tt]
Cursor = Cursors.Default[/tt]

to change it back. But the cursor switches back to Default prematurely - before that line is actually executed (as observed when stepping through with the debugger).

Does anything flip the cursor back to Default other than an explicit call to do so?

Thanks,
Dot
 
plenty of things can do that, windows for one. Hovering over a control that has similar code in it. It's a "public" object so expect it to change whenever you don't want. It is only recommended to change the cursor to a wait status when the processing will be short.

Christiaan Baes
Belgium

I just like this --> [Wiggle] [Wiggle]
 
The processing time is about 5 seconds. Any tips how to get this to work properly?

Thanks,
Dot
 
Which Cursor do you use? The Form's Cursor or a Control's Cursor.

Additionally, when you set a WaitCusor (I haven't tried others) on a Form with a RichTextBox (and presumably any TextBox descendent) the Cursor changes to an I-Bar when over the RTB.

Not very helpful, I know, but something to possibly look at.

[vampire][bat]
 
The Control's cursor. No RTB's on my form at all. Just a form and a control with a ListView...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top