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;
    }

This entry was posted on Cumartesi, Ağustos 8th, 2009 at 21:10 and is filed under Genel. You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.

Leave a Reply