<p>What I want to do is set the focus to a specific control (specifically a <code>TextBox</code>) on a tab page when that tab page is selected.</p>

<p>I've tried to call <code>Focus</code> during the Selected event of the containing tab control, but that isn't working. After that I tried to call focus during the <code>VisibleChanged</code> event of the control itself (with a check so that I'm not focusing on an invisible control), but that isn't working either.</p>

<p>Searching this site, I've come across this <a href="https://stackoverflow.com/questions/48680/winforms-c-set-focus-to-first-child-control-of-tab-page">question</a> but that isn't working either. Although after that, I did notice that calling the <code>Focus</code> of the control does make it the <code>ActiveControl</code>.</p>

I did this and it seems to work:
Handle the
```
SelectedIndexChanged
```
for the
```
tabControl
```
.
Check if
```
tabControl1.SelectedIndex
```
== the one I want and 
call
```
textBox.Focus();
```
I'm using VS 2008, BTW.
Something like this worked:
```
```
private void tabControl1_selectedIndexChanged(object sender, EventArgs e)
{
   if (tabControl1.SelectedIndex == 1)
   {
      textBox1.Focus();
   }
}
```
```