Machaira
Junior Contributor
I create a thread when my application starts which performs a query that returns a sizeable number of records. I'm running this in a separate thread to allow the user to use the features of the application that don't require this data. If the user invokes the feature that requires this data I display a message on the status bar and attempt to set the mouse cursor, as follows:
The only problem is the cursor does not change. Any suggestions as to why this might be occuring would be appreciated.
[edit]I missed some info in the Help concerning calling DoEvents.
[/edit]
Visual Basic:
Cursor.Current = Cursors.WaitCursor
DirectCast(Me.ParentForm, MainForm).StatusMsg("Loading commands, please wait...", False)
If tCommandListFormLoadThread.ThreadState = Threading.ThreadState.Running Then
tCommandListFormLoadThread.Priority = Threading.ThreadPriority.Highest
While tCommandListFormLoadThread.ThreadState = Threading.ThreadState.Running
Application.DoEvents()
End While
End If
Cursor.Current = Cursors.Default
[edit]I missed some info in the Help concerning calling DoEvents.
[/edit]