packages/Windows API Code Pack 1.1/source/Samples/Shell/TabbedThumbnailDemo/CS/Winforms/Form1.cs
/// <summary>
/// Close button - close the specific tab and also
/// remove the thumbnail preview
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
Close button - close the specific tab and also
remove the thumbnail preview
Close button - close the specific tab and also remove the thumbnail preview
private void button2_Click(object sender, EventArgs e)
        {
            if (tabControl1.SelectedTab != null)
            {
                TaskbarManager.Instance.TabbedThumbnail.RemoveThumbnailPreview(tabControl1.SelectedTab);
                tabControl1.TabPages.Remove(tabControl1.SelectedTab);
            }
            if (tabControl1.TabPages.Count == 0)
                button2.Enabled = false;
        }
private void button2_Click ( object sender , EventArgs e ) { if ( tabControl1 . SelectedTab != null ) { TaskbarManager . Instance . TabbedThumbnail . RemoveThumbnailPreview ( tabControl1 . SelectedTab ) ; tabControl1 . TabPages . Remove ( tabControl1 . SelectedTab ) ; } if ( tabControl1 . TabPages . Count == 0 ) button2 . Enabled = false ; }
Close button - close the specific tab and also
remove the thumbnail preview
Close button - close the specific tab and also remove the thumbnail preview
sender
object
None
e
EventArgs
None