Handle the KeyPress event of the TextBox. If you try to handle it in the KeyDown event, you'll get an annoying system beep.
Private Sub TextBox1_KeyPress(ByVal sender As Object, _
ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles _
If e.KeyChar = Convert.ToChar(Keys.Enter) Then
'This tells the system not to process
'the key, as you've already taken care
e.Handled = True
: How can I make the program do something when a person presses enter after pressing the Enter key on the keyboard? What does the textbox need to handle a Enter key press event?