SendInput() private method

private SendInput ( int nInputs, INPUT &pInputs, int cbSize ) : int
nInputs int
pInputs INPUT
cbSize int
return int
Exemplo n.º 1
0
        public static void LButtonDown()
        {
            INPUT i = new INPUT();

            i.type           = (uint)INPUT_TYPE.MOUSE;
            i.mi.dx          = 0;
            i.mi.dy          = 0;
            i.mi.dwFlags     = (int)MOUSEEVENTF.LEFTDOWN;
            i.mi.dwExtraInfo = IntPtr.Zero;
            i.mi.mouseData   = 0;
            i.mi.time        = 0;
            //send the input
            NativeMethods.SendInput(1, ref i, Marshal.SizeOf(i));
        }