static MouseOperations.MousePoint GetMousePoint() { while (!Console.KeyAvailable) { ; } Console.ReadKey(true); return(MouseOperations.GetCursorPosition()); }
static void MouseInfo() { Console.WriteLine("Press any key to stop..."); while (true) { if (Console.KeyAvailable) { Console.ReadKey(true); // intercept key so to not display it break; } var pos = MouseOperations.GetCursorPosition(); Console.WriteLine(pos.X + " " + pos.Y); Thread.Sleep(100); } }