By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,703 Members | 1,400 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,703 IT Pros & Developers. It's quick & easy.

Tab key trapping in VB.Net 2005

P: n/a
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.
Feb 17 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
jvb
Try setting the acceptstab property..

Feb 17 '06 #2

P: n/a
Aaron Smith wrote:
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...


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

Chris
Feb 17 '06 #3

P: n/a
This works perfectly. Thanks!

jvb wrote:
Try setting the acceptstab property..

--
---
Aaron Smith
Remove -1- to E-Mail me. Spam Sucks.
Feb 17 '06 #4

P: n/a
jvb
Your welcome...

Feb 17 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.