?
Solved

how to add to a buttom a keyboard key "Enter Key" (really easy)

Posted on 2007-10-16
2
Medium Priority
?
218 Views
Last Modified: 2013-11-26
hi,
i have a buttom that perform a search but if i click on it it does its job now is there a way that i can add the Enter key from the keyboard to do the same job?

for instance if i do hit enter on the keyboard i will do the same thing if i do click on the buttom?
how can i do this?
Thanks,
jsctechy
0
Comment
Question by:jsctechy
2 Comments
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 1000 total points
ID: 20086512
For the FORM, set the AcceptButton() Property to the button you want to be clicked when the user presses Enter:
http://msdn2.microsoft.com/en-us/library/system.windows.forms.form.acceptbutton.aspx
0
 
LVL 8

Expert Comment

by:Mikkk
ID: 20086617
Set the event: OnKeyPress (or similar) of the textbox of your search box, adn call the button function from there
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question