Exemplo n.º 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();
 }
Exemplo n.º 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);
        }