using enter key to set the focus

CRP

Member
Joined
Oct 30, 2007
Messages
11
Programming Experience
3-5
I have four textbox controls on my windows form. After entering something in textbox1 and if press enter the cursor should go to textbox2. Similary for all the textboxes. How to do it?

Thanx
 
Use the Control.KeyUp Event to check if e.KeyCode is Keys.Enter, if so use the GetNextControl method to find the next control in tab order and Select it.
 
Back
Top