private void driveTabControl_Selecting(object sender, TabControlCancelEventArgs e) { if (e.TabPage != addDriveTabPage) { return; } var tab = new DriveAccountTabPage(); driveTabControl.TabPages.Insert(driveTabControl.TabPages.Count - 1, tab); driveTabControl.SelectedTab = tab; }