'判断某一键盘键自上次调用该函数以来是否被按过的API函数 Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Const VK_ESCAPE = &H1B
ESC = GetAsyncKeyState(VK_ESCAPE) If ESC <> 0 Then Debug.Print "已经按了ECS键" End If
Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Const VK_ESCAPE = &H1B
ESC = GetAsyncKeyState(VK_ESCAPE) If ESC <> 0 Then unload me
End If