Una soluzione, meno accattivante graficamente, ma comunque funzionale, è quella di chiudere la Tab sfruttando il tasto centrale del mouse, proprio come avviene per Firefox.
Questo codice, dovrebbe farti ottenere proprio questo effetto:
codice:
Private Sub TabControl1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TabControl1.MouseUp
Dim thisControl As TabControl = CType(sender, TabControl)
If Not e.Button = Windows.Forms.MouseButtons.Middle Then Exit Sub
For i As Integer = 1 To thisControl.TabPages.Count - 1
If thisControl.GetTabRect(i).Contains(e.Location) Then
thisControl.GetControl(i).Dispose()
Exit For
End If
Next
End Sub
Boolean