Hi,
I have a form in which there are 11 textboxes and two button controls(Just example) ,I want the tab key control to be in the textbox1 when the form loads ,and then If I press Tab Key from keyboard then it will be on second number textbox and so on,currently in my form if I lay the textboxes in a correct sequence then it works perfectly For e,g. Textbox1 and then textbox2 and so on ,but If the textbox numbers are not in the sequence then after pressing tab key the control will be on the second number textbox and it might be on the bottom and there are some textboxes with in those two textboxes.I want the control to be on the second number of textbox regardless of the textboxes numbers.
How can I accomplish that?

Recommended Answers

All 2 Replies

In the Form Load handler you can set focus to the desired control like

TextBox1.Focus

When in design mode, under the View menu item, select Tab Order. This will show a number on each control. As you click on each control the tab order will be set to that sequence. That will be the order in which the controls will get focus as you use the tab key when running the program.

that is good :) thanks Reverend Jim thanks a lot :).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.