Is it correct that when I think the client could be busy and I call the
function WaitCursor that it automaticly comes back to the "normal arrow
state" or is the WaitCursor still active at the background ?
I tried somethings but when the client is ready and is back in the "normal
arrow state" I don't get the WaitCursor state. Unless I call it again. So it
seems that I only have to call WaitCursor when I think the client could be
busy and Windows does the rest and sets the cursor back to normal when the
data is retrieved.
I set the control's .Cursor property, and I don't mess with the .Current
property, so I am on unfamiliar ground. The documentation says that if you
change .Current, and the call DoEvents, the .Current property will be
restored:
"All controls that derive from the Control class have a Cursor property. To
change the cursor displayed by the mouse pointer when it is within the bounds
of the control, assign a Cursor to the Cursor property of the control.
Alternatively, you can display cursors at the application level by assigning
a Cursor to the Current property. For example, if the purpose of your
application is to edit a text file, you might set the Current property to
Cursors.WaitCursor to display a wait cursor over the application while the
file loads or saves to prevent any mouse events from being processed. When
the process is complete, set the Current property to Cursors.Default for the
application to display the appropriate cursor over each control type.
Note If you call Application.DoEvents before resetting the Current
property back to the Cursors.Default cursor, the application will resume
listening for mouse events and will resume displaying the appropriate Cursor
for each control in the application."