If you set the FormButton property to one of the buttons on the form, you will get this default behavior.
Otherwise, set the KeyPreview property to True on the form and handle its KeyDown event. You can check the Enter key and take the necessary actions.
Matt Hamilton Oct 02 '08 at 10:39
source share