how to change my mouse cursor to show it as busy in c#?

by (171 points)
0 votes
I am using c#. I need to log into server using WindowsLogin form. Windows login form will make request to the server. I need to show my cursor as busy when user is loggin in. Can you help me with code for the same in c#?

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.

1 Answer

answered by
selected by
0 votes
Best answer

To make your cursor wait use this at the begining of a function.

// Set cursor as hourglass
Cursor.Current = Cursors.WaitCursor;

// Execute your time-intensive hashing code here...


To change back cusrsor to default.

// Set cursor as default arrow
Cursor.Current = Cursors.Default;