Try this:
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If e.KeyChar = Microsoft.VisualBasic.ChrW(13) Then
Me.Button1.Focus()
End If
End Sub
or:
Private Sub TextBox1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyUp
If e.KeyCode = Keys.Enter Then
Me.Button1.Focus()
End If
End Sub
spigi
Hello Mamatha,
Hi
I have a samll application.
In that i have one textbox and one button.
When i enter some text in text box and press enter then
the button will have a focus.
How can i do this?
Mamatha