public static Web_Control getInstance() { if (control == null || control.IsDisposed) { control = new Web_Control(); control.FormBorderStyle = FormBorderStyle.None; control.Dock = DockStyle.Fill; control.MdiParent = Cat.ActiveForm; control.WindowState = FormWindowState.Maximized; } return(control); }
private void 网页监控ToolStripMenuItem_Click(object sender, EventArgs e) { Form active = this.ActiveMdiChild; if (active != null) { active.Dispose(); } if (webControl == null || webControl.IsDisposed) { webControl = Web_Control.getInstance(); webControl.Show(); } //if (webControl == null) //{ // webControl = Web_Control.getInstance(); // webControl.Show(); //} //webControl.StartPosition = FormStartPosition.Manual; //webControl.BringToFront(); }