Detecting Enter keypress on VB.NET
In the KeyDown Event:
If e.KeyCode = Keys.Enter Then
Messagebox.Show("Enter key pressed")
end if
Make sure the form KeyPreview property is set to true.
Private Sub Form1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress
If e.KeyChar = Microsoft.VisualBasic.ChrW(Keys.Return) Then
SendKeys.Send("{TAB}")
e.Handled = True
End If
End Sub