Tab key trapping in VB.Net 2005

A

Aaron Smith

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...
 
C

Chris

Aaron said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top