How to Make a button to Accept keyboard "Enter" Press

Jun 18 2010 3:52 PM

 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


Answers (1)