During the start of my windows application, I have to make a call to a web service to retrieve some default data to load onto my application. During the load of the form, I
There are a lot of answers here already but I found another solution that worked for me so I'd figured I list it.
private void ShowWaitCursor(){
Application.UseWaitCursor = true; //keeps waitcursor even when the thread ends.
System.Windows.Forms.Cursor.Current = Cursors.WaitCursor; //Normal mode of setting waitcursor
}
private void ShowNormalCursor(){
Application.UseWaitCursor = false;
System.Windows.Forms.Cursor.Current = Cursors.Default;
}
I use both in line like this and it seams to work the way I expect all the time. Especially when I want to have a wait cursor showing while a worker is running. Hope this helps anyone else still looking.