MDI formlarda Child Formların Bir Kereye Mahsus Açılması
Mdi formlarda child formaları 1 kere açmak için :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | Form2 mChild; private void optionsToolStripMenuItem_Click(object sender, EventArgs e) { if (mChild == null) { mChild = new Form2(); mChild.MdiParent = this; mChild.FormClosed += new FormClosedEventHandler(mChild_FormClosed); } mChild.WindowState = FormWindowState.Normal; mChild.Show(); } void mChild_FormClosed(object sender, FormClosedEventArgs e) { mChild = null; } |