UseWaitCursor What's the Point?

JaedenRuiner

Well-known member
Joined
Aug 13, 2007
Messages
340
Programming Experience
10+
Okay,

I have a form, and on the form I have several container objects that contain all my controls for resizing and other user customization. However, there comes a point when I'm executing a sql query and the connection takes a moment to load so I want to reflect this "thinking" state with the wait cursor, so as one would expect:
VB.NET:
Public Class MyForm
  
  private Sub DoWaitCursor(bWait as Boolean)
    Me.UseWaitCursor = bWait
  end sub

end class

And as one would not expect, it doesn't work. I don't know how VB lost all logic, but the Container should always OVERRIDE the contained objects, so that if I put a form with a list box and a text box, and I set the textbox.usewaitcursor = true, then the hourglass should only appear above teh textbox, but if i set the FORM.Usewaitcursor = true, I don't char what control the mouse is currently hovering over, if in the extents of the Form's client area, that cursor should be a damned hourglass. Yet, that does not appear to be the case.

So, how can I globally tell the system. "TURN ON HOURGLASS NOW!" until such time as I say "TURN OFF HOURGLASS NOW!" for my application.

Thanks
Jaeden "Sifo Dyas" al'Raec Ruiner
 
It works just fine as prescripted for me, but I don't know why it doesn't for you... So does Me.Cursor and Cursors.Current.
 
VB.NET:
Me.Cursor = Cursors.WaitCursor
'process something
Me.Cursor = Cursors.Default

I believe the UseWait cursor property is for when the control is in the process of loading. (It's only a guess at this point, and I've been known to be incorrect :))
 
Back
Top