How to hide TabPage from TabControl

Code Snippet for Hiding a TabPage

private void HideTab1_Click(object sender, EventArgs e)
{
    tabControl1.TabPages.Remove(tabPage1);
}

Code Snippet for Showing a TabPage

private void ShowTab1_Click(object sender, EventArgs e)
{
    tabControl1.TabPages.Add(tabPage1);
}

No, this doesn't exist. You have to remove the tab and re-add it when you want it. Or use a different (3rd-party) tab control.


I realize the question is old, and the accepted answer is old, but ...

At least in .NET 4.0 ...

To hide a tab:

tabControl.TabPages.Remove(tabPage);

To put it back:

tabControl.TabPages.Insert(index, tabPage);

TabPages works so much better than Controls for this.