コード例 #1
0
 static MouseOperations.MousePoint GetMousePoint()
 {
     while (!Console.KeyAvailable)
     {
         ;
     }
     Console.ReadKey(true);
     return(MouseOperations.GetCursorPosition());
 }
コード例 #2
0
 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);
     }
 }