Make "Enter" Key respond like TAB?

Imfromtexas

Member
Joined
Mar 9, 2005
Messages
8
Programming Experience
Beginner
I have several input boxes that I have limited the keys to numbers, decimal, and enter, I would like to have the cursor move to the "next" input box when enter is pressed? Any help would be greatly appreciated.
 
there's no magic function for this so you're going to need to code each textbox to move to the next one.

in the textbox's KeyUp event:
VB.NET:
Private Sub Textbox2_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Textbox2.KeyUp
  If e.KeyValue = 13 Then Textbox3.Focus() 'Enter Key
  If e.KeyValue = 27 Then Textbox1.Focus() 'Escape Key
End Sub
 
Back
Top