全局事件
Public Sub _TabPageClosing(sender As Object, e As C1.Win.C1Command.TabPageCancelEventArgs)
'页面关闭按钮点击事件
Dim name = e.TabPage.Text
If name = "主页" Then
e.Cancel = True
Else
If Forms.contains(name) Then
e.Cancel = True
Forms(name).Close
If sender.tabpages.Contains(e.tabpage)
sender.tabpages.remove(e.tabpage)
End If
End If
End If
End Sub
AfterOpenProject
Dim MainTab As C1Command.C1DockingTab = BaseMainform.Controls("MainPages")
Dim FormTab As C1Command.C1DockingTab = MainTab.TabPages(0).controls(0)
FormTab.CanCloseTabs = True
FormTab.CloseBox = 1
Formtab.CanAutoHide = True
AddHandler Formtab.TabPageClosing, AddressOf _TabPageClosing