if I wish to send three inputs(for example Ctrl,Alt,Z) from the keyboard, but at the same time, not one key after another, so what can I do?
Oh ok sure from codeproject website to send three keys Ctrl, Alt, and Z: keybd_event(VK_CONTROL, 0x9d, 0,0); //ctrl press keybd_event(VK_MENU, 0xb8, 0,0); //alt press keybd_event((BYTE)VkKeyScan('Z'), 0xac, 0,0); //Z press keybd_event(VK_CONTROL, 0x9d, KEYEVENTF_KEYUP,0); //ctrl release keybd_event(VK_MENU, 0xb8, KEYEVENTF_KEYUP,0); //alt release keybd_event((BYTE)VkKeyScan('Z'), 0xac, KEYEVENTF_KEYUP,0); //Z release
I didn't read carefully of your previous post, shabbir. To answer your post, no I didn't use PostMessage, but I did use the WM_COMMAND, where the user clicks on the button on the user interface then it will send out three keys input which I use keybd_event().