Focus to accept ok button

  • Thread starter Thread starter Djarnis
  • Start date Start date
D

Djarnis

On a form I invoke with ShowDialog I would like to set
the focus to the a button when the form is shown. I've
tried to set the Focus for the button, different places,
but can't seem to make it work correctly.

Best regards Djarnis
 
In your form property, set the Accept button property to
the desired button.

Second, you can make the button Tabindex property to be 0
to have a focus when the form loads ..

- sarosh
 
Back
Top