Hi Everyone,
How can I tell if a user pressed the "enter" key?
Printable View
Hi Everyone,
How can I tell if a user pressed the "enter" key?
You capture the event in the KeyDown or KeyPress event. Using a textbox as an example:
1 Code:
Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) _ Handles TextBox1.KeyDown If e.KeyCode = Keys.Enter Then End If End Sub
thanks stimbo. that works perfectly.