vb.net中tabcontrol,想通过双击相应的选项卡来关闭这个选项卡,就像360浏览器那样

2024-12-23 12:55:49
推荐回答(1个)
回答1:

用其自带函数Remove即可:
Private Sub TabControl1_DoubleClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TabControl1.DoubleClick
Me.TabControl1.TabPages.Remove(Me.TabControl1.SelectedTab)
End Sub