How do you set focus to a control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

HI
A very simple question. I like to set the focus to a TextBox when the forms opens. How do you do that in Vb.net
Thanks in Advance

Kelly Dykste
 
Hi Kelly,

in your forms load event...

\\\
TextBox1.Focus()
///

hope this helps,

jim
Kelly Dykster said:
HI,
A very simple question. I like to set the focus to a TextBox when the
forms opens. How do you do that in Vb.net.
 
Thanks jim, but i have tried it and it desn't do what i like it to do. I want when the form opens the IBeam Cursor start at the textbox and texbox.focus doesn't do it for me.
 
* "=?Utf-8?B?S2VsbHkgRHlrc3Rlcg==?= said:
A very simple question. I like to set the focus to a TextBox when the forms opens. How do you do that in Vb.net.

Assign the control the lowest 'TabIndex' on the form.
 
Back
Top