[C#] Enter button

Do you know how to make it execute the button1_Click function or do I have to copy and paste the code in to there?

-.- go to the event called KeyPress for the Form or w/e u want it to be pressed on while focused, for example if I have to form focused and I press the enter button it executes that code.

So I had it on the Form1_KeyPress event.
 
Back