What is UseWaitCursor all about?
The help file says only "When this property is set to true, the UseWaitCursor property of all open forms in the application will be set to true." That doesn't actually tell you what the effect of setting the property will be, simply that when you set it for one form, it will be set the same for all other forms. Who on earth writes this stuff?
The property grid says "When this property is set to true, the Cursor property of the control and its child controls is set to WaitCursor." This is untrue. Try the following code in a form with a button:
The cursor does not change while the loops are being cycled through. So is the UseWaitCursor property useless?
The help file says only "When this property is set to true, the UseWaitCursor property of all open forms in the application will be set to true." That doesn't actually tell you what the effect of setting the property will be, simply that when you set it for one form, it will be set the same for all other forms. Who on earth writes this stuff?
The property grid says "When this property is set to true, the Cursor property of the control and its child controls is set to WaitCursor." This is untrue. Try the following code in a form with a button:
Visual Basic:
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.UseWaitCursor = True
System.Windows.Forms.Application.DoEvents() 'doesn't help.
Dim h As Long = Now.Second
Dim i As Long = Now.Millisecond
Dim n As Long
Dim m As Long
For n = 1 To 100000
For m = 1 To 2000
Next
Next
Text = (Now.Second - h) * 1000 + Now.Millisecond - i
Me.UseWaitCursor = False
End Sub
End Class
The cursor does not change while the loops are being cycled through. So is the UseWaitCursor property useless?