title: C# MessageBox To Front When App is Minimized To Tray
body: <p>I have some code that popups a message box:</p>
  
  <pre><code>MessageBox.Show(this,
                   "You have not inputted a username or password. Would you like to configure your settings now?",
                   "Settings Needed",
                   MessageBoxButtons.YesNo,
                   MessageBoxIcon.Question);
  </code></pre>
  
  <p>My problem is when this pops up my app is usually minimized to the tray. As a result the messagebox doesn't come to the front and it also doesnt appear along the start bar. The only way of seeing it is by alt-tabbing.</p>
  
  <p>Here is the code that minimizes my app (the parent) to the tray:</p>
  
  <pre><code>if (FormWindowState.Minimized == WindowState)
  {                
        Hide();                
  }
  </code></pre>