title: Catch close event of child form c#
body: <p>In winform application I have a main form and other form. I want to trigger the event of <code>FormClosing</code> of the other form when I click "x" in the main form.</p>
  
  <p><strong>@Update:</strong></p>
  
  <p>Code:</p>
  
  <p>In the Program:</p>
  
  <pre><code>frmMain frm = new frmMain();
  frm.ShowDialog();
  </code></pre>
  
  <p>In frmMain:</p>
  
  <pre><code>private void btnFrm2_Click(object sender, EventArgs e)
  {
     Frm2 f2 = new Frm2();
     f2 .Show();
  }
  </code></pre>
  
  <p>In Frm2:</p>
  
  <pre><code>private void frm2_FormClosing(object sender, FormClosingEventArgs e)
  {
       //something
  }
  </code></pre>
  
  <p>How can I trigger the event <code>frm2_FormClosing</code> when I close <code>frmMain</code>?
  I know I can trigger it when I closing <code>frm2</code>, but I want to trigger it on closing <code>frmMain</code>.</p>