Thursday, August 19, 2010

Change Mouse Cursor

With C# easily the appearance of the mouse cursor can be changed, so for example instead of the standard arrow head a sand glass can be displayed.
The property which has to be changed for that is calld Cursor, a great collection of mouse cursor symbols can be found in the class Cursors.
Note though, that if you change the cursor with this function, this only holds for the area of the form.
To change the cursor to a hour glass for example (or in Vista or higher to this circling circle), the following code is necessary:

Cursor = Cursors.WaitCursor;

I want to show some more useful symbols:

Cursor = Cursors.AppStarting;

Cursor = Cursors.Arrow;

(Standard symbol) Cursor = Cursors.Default;

Cursor = Cursors.Hand;

Cursor = Cursors.Help;

Cursor = Cursors.No;

Cursor = Cursors.SizeAll;


No comments:

Post a Comment