Как программно нажать клавишу?
Приведу пример для клавиши "NumLock":
В 9x:
В 9x:
BYTE KeyboardState[256];В NT/2000/XP :
GetKeyboardState(KeyboardState);
KeyboardState[VK_NUMLOCK] = KeyboardState[VK_NUMLOCK] ^ 1;
SetKeyboardState(KeyboardState);
keybd_event( VK_NUMLOCK, 0x45, KEYEVENTF_EXTENDEDKEY | 0, 0 );
keybd_event( VK_NUMLOCK, 0x45, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0);