I want to find a way to make a specific button, the form’s default button,
I.e. the button that is highlighted when the form opens for the first time.
I tried the AcceptButton property but when I run the program, that does not work.
Any idea?
Thank you in advance,
Tassos
The form’s
AcceptButtonandCancelButtonproperties define the default behaviour for the Enter and Escape keys, rather than the highlighting.To highlight the button use the Focus method, but when doing this in the form_load event you will need to call the Select method instead.
As mentioned in the comments, setting the control to the lowest taborder will achieve the same thing