0

in my problems, i want to use event keyboard press 'Enter' on textbox, i'm very confuse because in event property from textbox there was Enter, but after I double click and read statement in that, after i test my program, there was nothing , please help
thanks before :)

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by nore
1

The "Enter" Event on TextBoxes get fired when the textbox becomes the active control (got focus).
Try instead this:

Private Sub TextBox1_KeyUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyUp
		If e.KeyCode = Keys.Enter Then
			MsgBox("you just pressed ENTER")
		End If
	End Sub

Edited by GeekByChoiCe: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.