改一下代码
Public Sub _TabPageClosing(sender As Object, e As C1.Win.C1Command.TabPageCancelEventArgs)'页面关闭按钮点击事件If e.TabPage.Text = "窗口2" Then MessageBox.Show("窗口2不能关闭!") e.Cancel = TrueElse Forms(e.TabPage.Text).Close e.cancel = TrueEnd IfEnd Sub