[求助] VB中 怎么判断一个键是否按下??
怎样判断一个键是否按下..????
用什么方法可以实现...
怎样判断一个键是否按下..????
用什么方法可以实现...
哈哈.我找到拉.
分享给大家
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