Hi i am making a window application
in which i want to know that when my application is start, so it should automatically get focus on textBox, how can i do that.........
Kindly help me in this...............?

If you are using Visual Studio you can edit the tab order of the controls.
The TextBox with the lowest tab order will recieve the focus.
Select tab order editing in the View menu.

If you are using Visual Studio you can edit the tab order of the controls.
The TextBox with the lowest tab order will recieve the focus.
Select tab order editing in the View menu.

Thanks for your reply ddanbe,
But i have already done this, it did not worked for me........
when application start, it is not focusing automatically to textBox.
i.e. the cursor automatically comes in the textbox........
how can i change that tab order
Kindly help me in this..........

Edited 7 Years Ago by avirag: n/a

Set the textbox' tab order to zero. Just click the number you see, set other controls accordingly. To leave tab order mode, just click View menu tab order again. Should work, succes!

Hi Avirag,
You can use the following code on form_load event :

this.textBox1.Focus();

Hope it works............
GudLuck

Hi Avirag,
You can use the following code on form_load event :

this.textBox1.Focus();

Hope it works............
GudLuck

Thanks vinnijain for your reply, but it is not working, i have already tried this.........

Set the textbox' tab order to zero. Just click the number you see, set other controls accordingly. To leave tab order mode, just click View menu tab order again. Should work, succes!

Thank you ddanbe.........
it's working ,my problem is solved now
thankyou once again

This question has already been answered. Start a new discussion instead.