哈哈.我找到拉.
分享给大家
Private Declare Function GetAsyncKeyState Lib "User32" (ByVal Vkey As Long) As Integer
Private Function MyHotKey(vKeyCode) As Boolean
MyHotKey = GetAsyncKeyState(vKeyCode) < 0
End Function
Private Sub Timer1_Timer()
If MyHotKey(vbKeyF4) Then MsgBox "你按下了F4"
End Sub