|
-
Jul 27th, 2011, 10:21 PM
#1
Thread Starter
Addicted Member
[RESOLVED] Hotkeys
I'm working on a project that contains hotkeys, but I don't wish to have global hotkeys. At the moment, I'm using KeyDown and e.KeyCode for hotkeys. I've created test projects where these worked perfectly fine, but on my main project, they don't register.
Code:
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.KeyCode = Keys.Tab Then
MsgBox("works")
End If
End Sub
Thanks for reading,
TsterT
-
Jul 27th, 2011, 11:27 PM
#2
Re: Hotkeys
Hi,
Didn't you forgot to set the Keypreview = True in the form properties.
-
Jul 27th, 2011, 11:30 PM
#3
Thread Starter
Addicted Member
Re: Hotkeys
It has, and always has been set to True. But for some odd reason, just worked ><.
Appreciate the reply,
TsterT
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
|