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 Hosseini48 pointsPosted Jun 18, 2010, 1:31 PM EDT
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"