title: DialogResult requires two Clicks on OK when Form Modal
body: <p>I have a <code>Child form</code> which I need <code>Modal</code>, so of course I use <code>child.ShowDialog()</code> to make the form <code>Modal</code>.  While in this <code>form</code> if the user selects the <code>close/cancel</code> button they are prompted by a <code>DialogResult</code> asking if they are certain they wish to close.  The problem occurs when the user selects <code>OK</code> on the <code>DialogResult</code>.  It requires two clicks on <code>OK</code> for the <code>DialogResult box</code> to close.  I found that if I use <code>Dispose</code> as well as <code>Close</code> I can make the <code>child form</code> go away on the first click, yet the <code>DialogResult box</code> remains.  What am I missing in the code below that will allow the <code>DialogResult box</code> and <code>Form</code> to close after one click on <code>OK</code>?</p>
  
  <pre><code>private void closeButton_Click(object sender, EventArgs e)
  {
      if (calBackgroundWorker.IsBusy)
      {
          DialogResult dialogResult = MessageBox.Show("The Compass Calibration is already in progress, are you sure you wish to cancel?", "Stop Calibration", MessageBoxButtons.OKCancel);
          if (dialogResult == DialogResult.OK)
          {
              calibrationInProgress = false;
              calBackgroundWorker.CancelAsync();
              this.Dispose();
              this.Close();
          }
      }
      else
      {
          this.Close();
      }
  }
  </code></pre>