Results 1 to 3 of 3

Thread: [RESOLVED] Hotkeys

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2009
    Posts
    166

    Resolved [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

  2. #2
    PowerPoster sparrow1's Avatar
    Join Date
    May 2005
    Location
    Globetrotter
    Posts
    2,820

    Re: Hotkeys

    Hi,

    Didn't you forgot to set the Keypreview = True in the form properties.
    Wkr,
    sparrow1

    If I helped you, don't forget to Rate my post. Thank you

    I'm using Visual Studio.Net 2003 and
    2005
    How to learn VB.Net Create setup with VB 2005 Drawing for beginners VB.Net Tutorials GDI+ Tutorials
    Video's for beginners

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2009
    Posts
    166

    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
  •  



Click Here to Expand Forum to Full Width