Add this
Code:
If MyBase.TabPages.Count = 0 Then Me.FindForm.Close()
To this section:
Code:
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
If m.Msg = WM_MOUSEDOWN Then
If onCloseButton AndAlso Not Me.DesignMode Then
MyBase.TabPages.Remove(MyBase.TabPages(HotTabIndex))
'add the code above here'
m.Msg = WM_NULL
End If
End If
MyBase.WndProc(m)
End Sub
I had this question a couple weeks ago I have a browser project I may need your help to sort through your code cause I have my own tab control but idk how to do the "+" button that would be interesting, maybe you could show me how to add just that?
Thanks
Jdc
p.s. all the code does is close the form when the last tab is closed so you don't get a empty tab control/window