[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 8397
  • Last Modified:

Programmatically move the mouse cursor

Without using the Win32 API....how do I programmatically move the mouse from one position to another, under VS .NET 2005?
0
Tom Knowlton
Asked:
Tom Knowlton
2 Solutions
 
athapaCommented:
If this an windows app then this will do the trick.
AT



x = 10;
y = 20;
Cursor.Position = new Point(x,y);
0
 
MsShadowCommented:
0
 
Bob LearnedCommented:
Cursor.Position will work, but you need to convert to screen coordinates:

     Cursor.Position = this.PointToScreen(Me.textBox1.Location);

Bob
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now