Esempio n. 1
0
 public static void CaptureMouse()
 {
     if (AllowMouseCapture)
     {
         if (!_mouseCaptured)
         {
             InteropEmu.DisplayMessage("Input", ResourceHelper.GetMessage("MouseModeEnabled"));
         }
         _mouseCaptured = true;
         HideMouse();
         Form  frm       = Application.OpenForms[0];
         Point centerPos = frm.PointToScreen(new Point(frm.Width / 2, frm.Height / 2));
         Cursor.Position = centerPos;
     }
 }