trap "enter" key on button to send "tab" to next control instead of fired OnClick(...)

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
I have a windows form with many buttons, what I like to do is move arround all edit controls using "enter key" so every time you finish fill your data in an edit control hit enter and move to next control, I know how to do it usind

 SendKeys.Send( "{TAB}" );

But what about buttons, when I hit enter , button.onclick is executed.

How can move to next control instead of OnClick(), but when you actually click with the mouse over this button you get OnClick as usual.

Thanks in advance for your help and time.

Edward Mac


View the full article
 
Back
Top