Focus on buttons and text fields

A

alex

Hi,
how can i put focus on a button a textfield that if the form loads the
item is selected.

btnLogin.Focus = true does not seem to work.

Thanks
A
 
T

Tom Spink

Hi Alex, It should be:

btnLogin.Focus()

--
HTH,
-- Tom Spink, Über Geek

Please respond to the newsgroup,
so all can benefit

"Maybe it's a game called 'Punish the User'"


: Hi,
: how can i put focus on a button a textfield that if the form loads the
: item is selected.
:
: btnLogin.Focus = true does not seem to work.
:
: Thanks
: A
:
 
H

Herfried K. Wagner [MVP]

Hello,

alex said:
how can i put focus on a button a textfield that if the form loads
the item is selected.

btnLogin.Focus = true does not seem to work.

Set its 'TabIndex' property to the lowest value on the form or call the
control's 'Focus' _method_ _after_ showing the form.
 

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

Top