|
-
Sep 21st, 2001, 03:48 PM
#1
Thread Starter
Addicted Member
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
-
Sep 21st, 2001, 04:34 PM
#2
Member
It worked for me, except it jumped to Taskmanager (or was that the problem?)
I ain't the best coder,
I ain't the worst coder
Messanger Handle : FBz
-
Sep 24th, 2001, 09:19 AM
#3
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|