全局代码
Public Sub _TabPageClosing(sender As Object, e As C1.Win.C1Command.TabPageCancelEventArgs)
'页面关闭按钮点击事件
If e.TabPage.Name = "主页" Then
MessageBox.Show("主页不能关闭!")
e.Cancel = True
Else
Dim frm As WinForm.Form = Forms(Sender.parent.name)
Dim ls As new List(of String)
For Each c As object In e.tabpage.controls
If c.Gettype.name.contains("o__o_00_") Then
c.visible = False
'msgbox(1)
End If
ls.add(c.name)
Next
For Each s As String In ls
frm.removeControl(s)
Next
End If
End Sub