Ejemplo n.º 1
0
        public void MouseRightClick()
        {
            MousePoint position = GetCursorPosition();

            mouse_event((int)MouseFlags.RightDown | (int)MouseFlags.RightUp,
                        position.X, position.Y, 0, 0);
        }
 public MousePoint GetCursorPosition()
 {
     MousePoint currentMousePoint;
     var gotPoint = GetCursorPos(out currentMousePoint);
     if (!gotPoint) { currentMousePoint = new MousePoint(0, 0); }
     return currentMousePoint;
 }
Ejemplo n.º 3
0
        public void MouseDoubleClick()
        {
            MousePoint position = GetCursorPosition();

            mouse_event((int)MouseFlags.LeftDown | (int)MouseFlags.LeftUp,
                        position.X, position.Y, 0, 0);

            mouse_event((int)MouseFlags.LeftDown | (int)MouseFlags.LeftUp,
                        position.X, position.Y, 0, 0);
        }
Ejemplo n.º 4
0
        public MousePoint GetCursorPosition()
        {
            MousePoint currentMousePoint;
            var        gotPoint = GetCursorPos(out currentMousePoint);

            if (!gotPoint)
            {
                currentMousePoint = new MousePoint(0, 0);
            }
            return(currentMousePoint);
        }
 private static extern bool GetCursorPos(out MousePoint lpMousePoint);
 public void SetCursorPosition(MousePoint point)
 {
     //SetCursorPos(point.X, point.Y);
     System.Windows.Forms.Cursor.Position =
         new System.Drawing.Point(point.X, point.Y);
 }
Ejemplo n.º 7
0
 private static extern bool GetCursorPos(out MousePoint lpMousePoint);
Ejemplo n.º 8
0
        public void MouseLeftBtnUp()
        {
            MousePoint position = GetCursorPosition();

            mouse_event((int)MouseFlags.LeftUp, position.X, position.Y, 0, 0);
        }
Ejemplo n.º 9
0
 public void SetCursorPosition(MousePoint point)
 {
     //SetCursorPos(point.X, point.Y);
     System.Windows.Forms.Cursor.Position =
         new System.Drawing.Point(point.X, point.Y);
 }