.Focus Question...

  • Thread starter Thread starter Tony
  • Start date Start date
T

Tony

I have two forms in my windows application, one have two textboxes, one have
a group box and two textboxes inside the group box, when i do .Focus() in
the first form, it works fine, however, when i do it on the second form, the
textboxes just couldn't get the focus... seems that control inside group box
can't get the focus via .Focus()
How can i get around this?
Thanks
Tony
 
Can you try this:

at from two:

this.Controls[2].Focus();

"this" is mean for form 2
index number "2" is assum your text box inside this form was have array
index of two.

hope this help

Kate
 
Back
Top