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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top