请问:用API函数key_bd 按下ALT键如何实现?
keybd_event ???,0,0,0
???,ALT
谢谢!
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long) Const VK_MENU = &H12 Const KEYEVENTF_KEYUP = &H2
Private Sub Command1_Click()
keybd_event VK_MENU, 0, 0, 0 '模拟"按下"动作 keybd_event VK_MENU, 0, KEYEVENTF_KEYUP, 0 '模拟"放开"动作,即完成一个按键动作 End Sub
[此贴子已经被作者于2005-10-11 23:23:39编辑过]