-
hot key help
I've tried just about everything, but I can't get this code to work... Help Me! Please!!!!!
Const VK_ESCAPE = &H1B
Const VK_CONTROL = &H11
Const VK_SHIFT = &H10
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Sub Timer1_Timer()
If GetAsyncKeyState(vbKeyControl) Then
If GetAsyncKeyState(VK_SHIFT) Then
If GetAsyncKeyState(vbKeyEscape) Then
MsgBox "Ctrl+Shift+Esc pressed"
End If
End If
End If
End Sub
Please post instructions... Thanks
-
It worked for me, except it jumped to Taskmanager (or was that the problem?)
-
Try This
I'm on xp so I had to change the code, I think you forgot to enable the timer so try this code it works:
Const VK_CONTROL = &H11
Const VK_SHIFT = &H10
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Sub Form_Load()
Timer1.Enabled = True
Timer1.Interval = 100
End Sub
Private Sub Timer1_Timer()
If GetAsyncKeyState(vbKeyControl) And GetAsyncKeyState(VK_SHIFT) Then
MsgBox "Ctrl+Shift Pressed"
End If
End Sub