Exemplo n.º 1
0
        /// <summary>
        /// Synthesizies right mouse button click at the current cursor position
        /// </summary>
        public static void SendRightMouseClick()
        {
            INPUTMOUSE im = new INPUTMOUSE();
              im.type = INPUTTYPE.INPUT_MOUSE;

              //Sends MOUSEEVENTF_RIGHTDOWN
              im.mi.dwFlags = MOUSEEVENTFLAGS.MOUSEEVENTF_RIGHTDOWN;
              SendInput(( uint )1, ref im, Marshal.SizeOf(im));

              //Sends MOUSEEVENTF_RIGHTUP
              im.mi.dwFlags = MOUSEEVENTFLAGS.MOUSEEVENTF_RIGHTUP;
              SendInput(( uint )1, ref im, Marshal.SizeOf(im));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Synthesizies right mouse button click at the current cursor position
        /// </summary>
        public static void SendRightMouseClick()
        {
            INPUTMOUSE im = new INPUTMOUSE();

            im.type = INPUTTYPE.INPUT_MOUSE;

            //Sends MOUSEEVENTF_RIGHTDOWN
            im.mi.dwFlags = MOUSEEVENTFLAGS.MOUSEEVENTF_RIGHTDOWN;
            SendInput(( uint )1, ref im, Marshal.SizeOf(im));

            //Sends MOUSEEVENTF_RIGHTUP
            im.mi.dwFlags = MOUSEEVENTFLAGS.MOUSEEVENTF_RIGHTUP;
            SendInput(( uint )1, ref im, Marshal.SizeOf(im));
        }
Exemplo n.º 3
0
 private static extern uint SendInput(uint nInputs, ref INPUTMOUSE pInputs, int cbSize);
Exemplo n.º 4
0
 private static extern uint SendInput(uint nInputs, ref INPUTMOUSE pInputs, int cbSize);