In the WinForm application, TabControl is a good control that can provide multiple tabs (TabPages) on demand, but one problem is that when a project requires multiple tabs, but different feature requirements show different tabs, other non-functional tabs do not appear, The TabPage does not have a visible property. We can do this in a different way:
1. The dynamic Add/delete (move) TabPage during WinForm operation increases the time spent, and the controls and information on the TabPage are processed dynamically;
2.tapage is actually a TabControl child control, then we can use its. Parent property to handle all TabPage additions (add) in the WinForm framework, in the WinForm run, with the selected function, the tab that needs to be displayed Tabpage_x.parent = this.tabcontrol_x, does not need to display the tab tabpage_x.parent = NULL;
Ps:tabpage_x refers to the TabPage control name, tabpage_x refers to the TabControl's space name.
TabControl Dynamic Display TabPage in C # WinForm