All programs except mine seems to have the same event when clicking the OK or confirmative button and when pressing the enter key.
How can I have mine to do that too?
Is it a keypress function?
Printable View
All programs except mine seems to have the same event when clicking the OK or confirmative button and when pressing the enter key.
How can I have mine to do that too?
Is it a keypress function?
Select your form, and change the AcceptButton property (under the Misc section) to whatever button you want to be pressed when the user hits Enter.
gL!
Furry
If I understand your question correctly, you want to have a textbox click a button when the user presses enter?
If that is the case you can do it with code in the KeyDown event like this...
Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
If (e.KeyCode = Keys.Enter) Then _
Call Button1_click(sender, e)
End Sub
hope that helps