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?
Make mouse with busy icon (C#)
18.1k views Asked by mouthpiec At
4
There are 4 answers
0
On
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.
0
On
I have no option to add my answer as a comment to SLaks answer, so i post it as an answer
In order to force application to set cursor to wait cursor at once, you have to call for Application.DoEvents() method after setting Application.UseWaitCursor, otherwise it might be changed after the lengthy process has been completed
Application.UseWaitCursor=true;
Application.DoEvents();
Use Cursor.WaitCursor property.
source: http://bytes.com/topic/c-sharp/answers/238623-how-change-mouse-cursor-busy-state