title: Minimizing the application form causes a modal form to close, but not a MessageBox
body: <p>If I programatically minimize the application's form while a modal dialog is open, that modal dialog gets closed.</p>
  
  <p>However, if I programatically minimize the application's form while a MessageBox is open, the MessageBox is not closed (i.e. when I restore the application to normal window state, the message box is still showing).</p>
  
  <p>Here's my sample code demonstrating the difference:</p>
  
  <pre><code>    public partial class Form1 : Form
      {
          // ... 
  
          private void showMessageBoxBtn_Click(object sender, EventArgs e)
          {
              timer1.Start();
  
              // This MessageBox does *not* get closed when the WindowState of Form1 is set to minimized in timer1_Tick
              MessageBox.Show(this, "MessageBox");
          }
  
          private void formShowDialogBtn_Click(object sender, EventArgs e)
          {
              timer1.Start();
  
              // This form gets closed when the WindowState of Form1 is set to minimized in timer1_Tick
              Form2 form2 = new Form2();
              form2.ShowDialog(); 
          }
  
          private void timer1_Tick(object sender, EventArgs e)
          {
              WindowState = FormWindowState.Minimized;
              timer1.Stop();
          }
      }
  </code></pre>
  
  <p><strong>Question:</strong></p>
  
  <p>Is there a way to get the Form to behave like the MessageBox?</p>