Sadly, you cannot do as you wish. You have to add and remove tabs and re-add them if you want that effect.
Try using this kind of syntax:
theTabControl.TabPages.Remove(tabPageA);
Then to re-add:
theTabControl.TabPages.Add(tabPageA);
Hide() - Hiding the control is equivalent to setting the Visible property to false. After the Hide method is called, the Visible property returns a value of false until the Show method is called.
Why you might use it - You might use Show()
or Hide()
when you know the value and use Visible
when you take the visibility in as a parameter, although I would personally tend to always use Visible
.
What it will do in this case - In this case it is useless and will not do anything. Just like Visible(), the following applies to it:
"TabPage controls are constrained by their container, so some of the properties inherited from the Control base class will have no effect, including Top, Height, Left, Width, Show, and Hide."