private void form01ToolStripMenuItem_Click(object sender, EventArgs e) { if (_form01 == null) { _form01 = new Form01(this); _form01.MdiParent = this; _form01.FormClosed += new FormClosedEventHandler(form01_FormClosed); _form01.Show(); } else { _form01.Activate(); } }
void form01_FormClosed(object sender, FormClosedEventArgs e) { _form01 = null; }