public MDIForm() { InitializeComponent(); if (helpForm == null) { helpForm = new helpForm(); helpForm.MdiParent = this; helpForm.WindowState = FormWindowState.Maximized; helpForm.Show(); helpForm.FormClosed += new FormClosedEventHandler(helpForm_FormClosed); } }
private void helpToolBtn_Click(object sender, EventArgs e) { if (helpForm == null) { helpForm = new helpForm(); helpForm.MdiParent = this; helpForm.WindowState = FormWindowState.Maximized; helpForm.FormClosed += new FormClosedEventHandler(helpForm_FormClosed); helpForm.Show(); } else { helpForm.WindowState = FormWindowState.Maximized; helpForm.Activate(); helpForm.Focus(); } }
void helpForm_FormClosed(object sender, FormClosedEventArgs e) { helpForm.Dispose(); helpForm = null; }