Neither Hide() nor setting Visible=False will work with TabPages. You can remove them through the TabControl's Controls collection or the TabPages collection using the Remove method.
For example, use one of the two lines below (they do the same thing):
Code:
tabControl1.TabPages.Remove(tabPage2); // OR tabControl1.Controls.Remove(tabPage2);
Keep in mind that if you want to add the tabpages back in later, you have to add them in the order you want them. That may mean removing them all and adding them back in one at a time.
-Nerseus
|
__________________
"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
|