private void openSubFormToolStripMenuItem_Click(object sender, EventArgs e) { if (a == null) { a = new sub_Form(); a.FormClosed += new FormClosedEventHandler(sub_Form_FormClosed); a.MdiParent = this; a.Show(); } }
private void sub_Form_FormClosed(object sender, FormClosedEventArgs e) { a = null; }