title: When I switch between forms some events are not working
body: <p><strong>Scenario:</strong></p>
  
  <p>I have a Form (<code>Form1</code>) which consists of following elements.</p>
  
  <p>A panel called <code>panel1</code>, four buttons as <code>btnLoadForm2</code>, <code>btnLoadForm3</code>, <code>btnSave</code>, <code>btnDelete</code>.</p>
  
  <p>When I click the <code>btnLoadForm2</code> or <code>btnLoadForm3</code> it loads the <code>Form2</code> or <code>Form3</code> into <code>panel1</code> in <code>Form1</code>.</p>
  
  <p><strong>But the Problem is</strong></p>
  
  <p>For exmaple;</p>
  
  <p>When I work with the first loaded Form doesn't matter which one is loaded in the panel (Form2 or Form3) both btnSave and btnDelete events are working. But When I switch the Form non of button events are working.</p>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>// Codes in Form1 which consists of panel1 and all other buttons
  
     private void btnloadForm2_Click(object sender, EventArgs e)
     {
          var form = panel1.Controls.OfType&lt;Form&gt;().First();
  
          if (form.Name != "Form2")
          {
              panel1.Controls.Clear();
              Form newForm = new Form2();
              newForm.TopLevel = false;
              newForm.Visible = true;
              panel1.Controls.Add(newForm);
          }
      }
  
     private void btnloadForm3_Click(object sender, EventArgs e)     
     {
          var form = panel1.Controls.OfType&lt;Form&gt;().First();
  
          if (form.Name != "Form3")
          {
              panel1.Controls.Clear();
              Form newForm = new Form3();
              newForm.TopLevel = false;
              newForm.Visible = true;
              panel1.Controls.Add(newForm);
          }
      }
  
      private void btnSave_Click(object sender, EventArgs e)
      {
          var form = panel1.Controls.OfType&lt;Form&gt;().First();
  
          if (form.Name == "Form2")
          {
              Form2 f2 = (Form2)Application.OpenForms.OfType&lt;Form2&gt;().FirstOrDefault();
              f2.Save();
          }
  
          else if (form.Name == "Form2")
          {
              Form3 f3 = (Form3)Application.OpenForms.OfType&lt;Form3&gt;().FirstOrDefault();
              f3.Save();
          }
      }
  
      private void btnDelete_Click(object sender, EventArgs e)
      {
          var form = panel1.Controls.OfType&lt;Form&gt;().First();
  
          if (form.Name == "Form2")
          {
              Form2 f2 = (Form2)Application.OpenForms.OfType&lt;Form2&gt;().FirstOrDefault();
              f2.Delete();
          }
  
          else if (form.Name == "Form3")
          {
              Form3 f3 = (Form3)Application.OpenForms.OfType&lt;Form3&gt;().FirstOrDefault();
              f3.Delete();
          }
      }
  </code></pre>
  
  <p>Please anyone tell me whats wrong with my code.. </p>
  
  <p>I'm not going to write the codes in my <code>Form2</code> and <code>Form3</code>..  all codes are working when the Forms are loaded into the <code>Form1.Panel1</code> in my first attempt.</p>