Hi Guys,
Could you please let me know how to make a button (like Add to listbox button) to accept keyboard "Enter" press?
I tried to use:
btnAdd.Selected();
In the Form load events but In this case , the txtInput will lose it's select property and when I click inside the textbox to enter a value the btnAdd also will be unselected!
should I change any thing in btnAdd properties or events?
Regards
Behrouz HosseiniPosted Jun 18, 2010, 5:31 PM
I find the answer, It may be helpful to know that
the Form has a property called "AcceptButton". just set it to your any button which you want. here I set it to "btnAdd"