Пример #1
0
 private void test1()
 {
     System.Threading.Thread.Sleep(1000);
     VirtualMouse.Move(10, 20);
     System.Threading.Thread.Sleep(100);
     VirtualMouse.RightClick();
     System.Threading.Thread.Sleep(100);
     VirtualMouse.Move(20, 0);
     VirtualMouse.LeftClick();
 }
Пример #2
0
        private int click(string param)
        {
            if (param == VirtualMouse.mouse_button.right_button.ToString())
            {
                VirtualMouse.RightClick();
            }
            else if (param == VirtualMouse.mouse_button.Left_button.ToString())
            {
                VirtualMouse.LeftClick();
            }
            else if (param == VirtualMouse.mouse_button.middle_button.ToString())
            {
                VirtualMouse.MiddleClick();
            }
            else
            {
                throw new NotSupportedException("Parameter can be only right or left, get parameter: " + param);
            }

            return(0);
        }
Пример #3
0
 // move the cursore to new x:y point
 private int moveMouseToXY(string s)
 {
     VirtualMouse.MoveTo(x, y);
     return(0);
 }