Welcome to WindowsClient.net | Sign in | Join

Here are some frequently asked questions about Windows Forms and their answers.

Windows Forms FAQs

How do I set the mouse cursor position?

The Cursor.Position property is a static property with both get and set methods available. Remember that the Point object used by the property is in screen coordinates. Here is code that move the mouse position down 20 points.

Point point = Cursor.Position; 
point.Y += 20; 
Cursor.Position = point;

Contributed from George Shepherd's Windows Forms FAQ