Dim e =args(0) Dim sender =args(1) If e.TabPage.Name = "主页" Then e.Cancel = True Else Dim Result As DialogResult Result = MessageBox.Show("是否关闭?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) If Result = DialogResult.Yes Then Dim frm As WinForm.Form = Forms("serevmain") Dim ls As new List(of String) For Each c As object In e.tabpage.controls If c.Gettype.name.contains("o_O0_oO0") Then c.visible = False End If ls.add(c.name) Next For Each s As String In ls frm.removeControl(s) 'DataTables.Unload(s) Next Else e.Cancel = True End If End If
|