|
-
Oct 31st, 2002, 11:56 AM
#1
Thread Starter
Addicted Member
Button click on enter?
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?
-
Oct 31st, 2002, 01:19 PM
#2
Addicted Member
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
 Eat long and prosper! 
If someone helps you, find someone you can help.
If you still have time, click on the darn banner up there and help the forum! 
-
Nov 6th, 2002, 11:05 AM
#3
Hyperactive Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|