如何使用 keybd_event() 模拟 Ctrl+Alt+H ?以下代码不起作用:
keybd_event((byte)Convert.ToInt32(Keys.Control), (byte)MapVirtualKey(Convert.ToInt32(Keys.Control), 0), 0, 0);
keybd_event((byte)Convert.ToInt32(Keys.Alt), (byte)MapVirtualKey(Convert.ToInt32(Keys.Alt), 0), 0, 0);
keybd_event((byte)Keys.H, (byte)MapVirtualKey(Convert.ToInt32(Keys.H), 0), 0, 0);
keybd_event((byte)Keys.H, (byte)MapVirtualKey(Convert.ToInt32(Keys.H), 0), KEYEVENTF_KEYUP, 0);
keybd_event((byte)Convert.ToInt32(Keys.Alt), (byte)MapVirtualKey(Convert.ToInt32(Keys.Alt), 0), KEYEVENTF_KEYUP, 0);
keybd_event((byte)Convert.ToInt32(Keys.Control), (byte)MapVirtualKey(Convert.ToInt32(Keys.Control), 0), KEYEVENTF_KEYUP, 0);