I've found many articles on how to set the mouse position in a C# windows forms project - I want to do this in a console application. How can I set the absolute mouse position from a C# windows console application?
Thanks!
Hint: it's not Console.setCursorPosition, that only sets the position of the text cursor in the console.
This is an old thread, but for the sake of completion it can be done this way...
use System.Runtime.InteropServices;
[DllImport("user32.dll")]
static extern bool SetCursorPos(int X, int Y);
then in method whatever position you wish e.g.
SetCursorPos(500, 500);