1个回答
展开全部
'快截键相关声明开始
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
'快截键相关声明结束
'快截键相关函数开始
Private Function MyHotKey(vKeyCode) As Boolean
MyHotKey = (GetAsyncKeyState(vKeyCode))
End Function
'快截键相关函数结束
'快截键
Private Sub Timer3_Timer()
If MyHotKey(vbKeyPageUp) Then 'PageUp
End If
If MyHotKey(vbKeyHome) Then 'Home
End If
If MyHotKey(vbKeyPageDown) Then 'PageDown
End If
End Sub
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As Integer
'快截键相关声明结束
'快截键相关函数开始
Private Function MyHotKey(vKeyCode) As Boolean
MyHotKey = (GetAsyncKeyState(vKeyCode))
End Function
'快截键相关函数结束
'快截键
Private Sub Timer3_Timer()
If MyHotKey(vbKeyPageUp) Then 'PageUp
End If
If MyHotKey(vbKeyHome) Then 'Home
End If
If MyHotKey(vbKeyPageDown) Then 'PageDown
End If
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询