Software Development Network>> Visual C#>> Move mouse programatically?
Thank you very much. That was too easy!
One more thing, can I make the mouse click programatically
Thanks,
You can do it using Cursor.Position property:
Cursor.Position = new Point(x, y);
But think twice before you do it, it may be confusing or annoying for the end user.
Yes but not as easy as moving the mouse. You'll have to pinvoke the SendInput Win32 API:
http://msdn.microsoft.com/library/default.asp url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputfunctions/sendinput.asp
https://blogs.msdn.com/robgruen/archive/2004/05/10/129221.aspx
Move mouse programatically?
SimonGUK
Thank you very much. That was too easy!
One more thing, can I make the mouse click programatically
Thanks,
bigove
You can do it using Cursor.Position property:
Cursor.Position = new Point(x, y);
But think twice before you do it, it may be confusing or annoying for the end user.
lokia
Yes but not as easy as moving the mouse. You'll have to pinvoke the SendInput Win32 API:
http://msdn.microsoft.com/library/default.asp url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/keyboardinputreference/keyboardinputfunctions/sendinput.asp
https://blogs.msdn.com/robgruen/archive/2004/05/10/129221.aspx