Tab key trapping in VB.Net 2005

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Aaron Smith

    #1

    Tab key trapping in VB.Net 2005

    How do you trap the tab key in a textbox? I have tried all the key
    events, and none of them seem to work right with the tab key. It seems
    when you press the tab key in one textbox, the keyup event of the next
    textbox in in the tab order gets the tab keyup event. I need to know
    when the tab key is pressed in the current text box, not the next one...

    --
    ---
    Aaron Smith
    Remove -1- to E-Mail me. Spam Sucks.
  • jvb

    #2
    Re: Tab key trapping in VB.Net 2005

    Try setting the acceptstab property..

    Comment

    • Chris

      #3
      Re: Tab key trapping in VB.Net 2005

      Aaron Smith wrote:[color=blue]
      > How do you trap the tab key in a textbox? I have tried all the key
      > events, and none of them seem to work right with the tab key. It seems
      > when you press the tab key in one textbox, the keyup event of the next
      > textbox in in the tab order gets the tab keyup event. I need to know
      > when the tab key is pressed in the current text box, not the next one...
      >[/color]

      Override the ProcessCmdKey function. that will give you access to the
      Tab and other keys not in the keypress event.

      Chris

      Comment

      • Aaron Smith

        #4
        Re: Tab key trapping in VB.Net 2005

        This works perfectly. Thanks!

        jvb wrote:[color=blue]
        > Try setting the acceptstab property..
        >[/color]


        --
        ---
        Aaron Smith
        Remove -1- to E-Mail me. Spam Sucks.

        Comment

        • jvb

          #5
          Re: Tab key trapping in VB.Net 2005

          Your welcome...

          Comment

          Working...