In order to do this you can capture when the key that you want to shift
focus is pressed (using an event, overriding the WndProc method, etc, etc).
When the event that is supposed to shift the focus occurs, call the
GetNextControl method on the current control and then call Focus on the
control returned.
The best solution is probably to handle the myTextBox.KeyDown event, check
the KeyCode property on the event argument, and if it's KeyCode.Enter, set
the focus on the next text box you want with myNextTextBox.Focus() and set
e.Handled to true.
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.