怎样判断我按了ESC键???
怎样判断我按了ESC键??? '判断某一键盘键自上次调用该函数以来是否被按过的API函数<BR>Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As IntegerPrivate Const VK_ESCAPE = &H1B
ESC = GetAsyncKeyState(VK_ESCAPE)<BR>If ESC <> 0 Then<BR> Debug.Print "已经按了ECS键"<BR>End If 窗体上有很多控件,加载窗体后按ESC键卸载窗体
If ESC <> 0 Then<BR> unload me
End If
又该放到哪里呢? Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Const VK_ESCAPE = &H1B
ESC = GetAsyncKeyState(VK_ESCAPE)<BR>If ESC <> 0 Then<BR> unload me
End If
<BR>
页:
[1]