so as you can see from the title, I want to be able to double click on the tab (top of the tab where it has the name of it) and I want it to remove. I have currently got the following code to create the tab:
Private Sub Panel1_DoubleClick(sender As Object, e As EventArgs) Handles Panel1.DoubleClick
Dim tab As New TabPage
Dim newtab As New tab
newtab.Show()
newtab.Dock = DockStyle.Fill
newtab.TopLevel = False
tab.Controls.Add(newtab)
Form1.TabControl1.TabPages.Add(tab)
Form1.TabControl1.SelectedTab = tab
End Sub
So the tabs are created by double clicking on the panel. This works fine, but I now want to be able to Double Click a tab and it gets rid of it. I tried using AddHandler but I couldn't quite get it. Thanks for the help :)