private void form03ToolStripMenuItem_Click(object sender, EventArgs e) { if (_form03 == null) { _form03 = new Form03(); _form03.MdiParent = this; _form03.FormClosed += new FormClosedEventHandler(form03_FormClosed); _form03.Show(); } else { _form03.Activate(); } }
private void btnOpenForm3_Click(object sender, EventArgs e) { if (_form03 == null) { _form03 = new Form03(); _form03.MdiParent = _mdiParentForm; _form03.FormClosed += new FormClosedEventHandler(form03_FormClosed); _form03.Show(); } else { _form02.Activate(); } }
public void OpenForm3(bool isFromForm1 = false) { if (_form03 == null) { _form03 = new Form03(); _form03.MdiParent = this; _form03.FormClosed += new FormClosedEventHandler(form03_FormClosed); _form03.Show(); if (isFromForm1) { _form02.Form03 = _form03; } } else { _form03.Activate(); } }
void form03_FormClosed(object sender, FormClosedEventArgs e) { _form03 = null; }