I have an application that takes a couple of seconds to run. Is it possible to make the mouse with the busy icon while the app is processing?
+7
A:
Use Cursor.WaitCursor property.
You can use:
Cursor.Current = Cursors.WaitCursor;and as long as there is some processing going on in a
WinFormsapplication, the cursor stays in theWaitCursorstate.You can as well use your custom designed cursors:
Cursor.Current = new Cursor("C:\\Cursors\\MyWait.cur");
source: http://bytes.com/topic/c-sharp/answers/238623-how-change-mouse-cursor-busy-state
XpiritO
2010-03-25 15:16:59
The `UseWaitCursor` property is more reliable.
SLaks
2010-03-25 15:19:23
+1
A:
Cursor.Current = Cursors.WaitCursor;
You will need a reference to System.Windows.Forms to change the cursor.
Thibault Falise
2010-03-25 15:17:40
+3
A:
You need to set the form's UseWaitCursor property to true. (And remember to set it to false again afterwords, preferably in a finally block)
You can also set Application.UseWaitCursor to true to apply it to every form.
SLaks
2010-03-25 15:18:06