title: C# MDI Parent detect when MDI Child is closing?
body: <p>I'm attempting to detect, on the MDI parent, when my MDI child form closes, and react accordingly. The MDI parent shouldn't do anything until the MDI child closes. Here is my code, I'm unsure as to what I'm doing wrong, but the form closed event method I added is never being called...</p>
  
  <p>The following code is in the MDI parent class, if that wasn't obvious.</p>
  
  <pre><code>    private void keyValidation()
      {
          if (Properties.Settings.Default.Unlock == true)
              return;
          else
          {
              menu.Enabled = false;
              statusStrip.Enabled = false;
  
              ValidationForm vf = new ValidationForm();
              vf.MdiParent = this;
              vf.Show();
              vf.FormClosed += new FormClosedEventHandler(validationForm_FormClosed);
          }
      }
  
      void validationForm_FormClosed(object sender, FormClosedEventArgs e)
      {
          MessageBox.Show("Got here");
          if (Properties.Settings.Default.Unlock == true)
          {
              menu.Enabled = true;
              statusStrip.Enabled = true;
          }
      }
  </code></pre>
  
  <p>Thanks for any help!</p>