Exemplo n.º 1
0
 private void SendKeyUp(short key) 
 { 
     Input[] input = new Input[1]; 
     input[0].type = INPUT.KEYBOARD; 
     input[0].ki.wVk = key; 
     input[0].ki.dwFlags = KeyboardConstaint.KEYEVENTF_KEYUP;
     input[0].ki.time = Win32.GetTickCount();
     if (Win32.SendInput((uint)input.Length, input, Marshal.SizeOf(input[0])) < input.Length) 
     { throw new Win32Exception(Marshal.GetLastWin32Error()); } 
 }
Exemplo n.º 2
0
 internal static extern UInt32 SendInput(UInt32 nInputs, Input[] pInputs, Int32 cbSize);
Exemplo n.º 3
0
 [DllImport("user32.dll")]public static extern UInt32 SendInput(UInt32 nInputs, Input[] pInputs, int cbSize);