get Key Code

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • alexJavaRocks
    New Member
    • Oct 2007
    • 4

    get Key Code

    Hey, I am sort of new to VB. I added a key listener to a text box of mine and I need to figure out a way of doing this:
    Code:
    If KeyCode = vkKeyReturn Then
    except in VB :)

    That means, I need to get the key code and I need to check if it is the Return key.

    Alright, thanks.
  • alexJavaRocks
    New Member
    • Oct 2007
    • 4

    #2
    Ohh, really sorry, I figured out the Key Code thing. I didn't see the KeyEventArgs. I apologize. But what I need now is to find out how to see what key was pressed, or to check if it was the enter key :)

    I want to do
    Code:
    If e.KeyCode = vkKeyReturn Then
    but vkKeyReturn is not a declared variable. I know I need to get it from some class.

    CAN ANYONE PLEASE HELP?

    Comment

    • alexJavaRocks
      New Member
      • Oct 2007
      • 4

      #3
      Wow do I feel stupid, thank you very much. LOL I JUST FIGURED IT OUT.

      Comment

      Working...