Results 1 to 3 of 3

Thread: [RESOLVED] handling key presses

Hybrid View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2005
    Posts
    156

    Resolved [RESOLVED] handling key presses

    I have the following code yet it seems to be not responding to the key presses.
    Am I missing something?

    VB Code:
    1. Private Sub frmBDwgUp_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
    2.         If e.KeyCode = Keys.Enter Then
    3.             GO()
    4.         End If
    5.     End Sub

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: handling key presses

    Have you set the KeyPreview property to True?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 2005
    Posts
    156

    Re: handling key presses

    that was it. Thank you very much

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