i have a windows based application which contains textboxes when i press enter in one textbox then focus should go to next textbox i dont want to hard code like ex: textbox3.focus but i want to control it using the tab index (retriving it from present control then using the tab index guiding the focus to the next control ) could u please suggest me a solution preferbly if u give me sample code
with regards and thanks
vijay
Hi cvijaykrishna,
If you want,You dont have to write a single line of code for that...
Textbox has a TabIndex property
Suppose you have 4 textboxes..
set
TabIndex Property of the textbox from
Properties window like....
TextBox1------------->TabIndex=0
TextBox2------------->TabIndex=1
TextBox3------------->TabIndex=2
TextBox4------------->TabIndex=3
if you have many textboxes go to Design mode of your Form...........then go to
View---->
Tab Order
Set your TabIndex here by just
Clicking the Small squares which will appear at the corner of the textboxes in the order you want