title: Child form in a mdi parent in C#
body: <p>I use the following codes for showing child form in a MDI parent form. As you know clicking the button will cause a new form to appear. Keep clicking the button and your screen will be filled with blank forms. To stop this from happening, I moved the code that creates the form outside of the button. </p>
  
  <p>Like this:  </p>
  
  <pre><code>public partial class Form1 : Form
  {
      public Form1()
      {
          InitializeComponent();
      }
  
      Form2 f2 = new Form2();    
  
      private void button1_Click(object sender, EventArgs e)
      {
          f2.MdiParent = this;
          f2.Show();
      }
  </code></pre>
  
  <p>But when I close the child form and want to open it again, it won't let me.</p>
  
  <p>Please help me to solve this. </p>