button problem

  • Thread starter Thread starter dawn
  • Start date Start date
D

dawn

Hi,

I have a form with 4 buttons on it. Now when the user presses enter....i
always want the button2_click event to be fired, no matter what button was
last clicked on by the mouse.
However if I click on a button with the mouse....it needs to fire the event
for the button that was clicked.
So what i actually want to do is.....when the user clicks with his mouse on
a button....the button_click event for that button gets fired......but when
the user presses enter.....i always want the button2_click event to be fired
even if another button is active at that moment.

How do I do this?

thanks,

Bart.

PS : sorry if this is confusing.....it confuses me too ;-)
 
Capture keypress on the form and set e.Handled to true for enter, then
call the function button2 uses.
 
Back
Top