Hi johnny,
Especially for Click (and couple of others) Control class has method for
simulating it.
Take a look at Control.InvokeO nClick method.
So what you need to do is to call your form's InvokeOnClick(b utton,
EventArgs.Emty) ;
where button is reference to the button which click event you want to raise.
--
HTH
Stoitcho Goutsev (100) [C# MVP]
"johnny" <jo****@discuss ions.microsoft. com> wrote in message
news:7C******** *************** ***********@mic rosoft.com...
On a form I would like to simulate a button click when the Enter is
pressed.
My form is setup and it works if the delegate for the key pressed on the
form
calls the delegate for the button pressed. But can we simulate a button
click
instead?
This way if later the delegate is changed for the button, we don't forget
to
do the changes on other events?