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 :)

Recommended Answers

All 2 Replies

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

Thanks GeekByChoiCe :D

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.