I suggest you define a List<TabPage> to hold the removed TabPages, and provide a 'ControlRemoved EventHandler for the TabControl:
private List<tabpage> RemovedTabs;
private void Form1_Load(object sender, EventArgs e)
{
RemovedTabs = new List<tabpage>();
YourTabControl.ControlRemoved += YourTabControl_ControlRemoved;
}
private void YourTabControl_ControlRemoved(object sender, ControlEventArgs e)
{
Console.WriteLine("removed TabPage {0}", e.Control.Name);
RemovedTabs.Add(e.Control as TabPage);
}</tabpage></tabpage>
Note that removed TabPages are
not Disposed ! So, if you want to Dispose a TabPage, you should remove it from the 'RemovedTabs List before you call 'Dispose.
Using this technique you can check which TabPages are "open" by simply enumerating the TabControl.TabPages TabPagesCollection, and check which Tabs have been removed by enumerating the list in 'RemovedTabs.