title: How to hide a modal dialog without returning from .ShowDialog?
body: <p>I have an application in vb.net that starts with a sub function do some things and decide if it shows itself or not. When it shows itself it does so by invoking <code>dialog.ShowDialog()</code>.</p>
  
  <p>When <code>dialog.ShowDialog()</code> returns, the application does some cleaning and ends.</p>
  
  <p>I'd like to find a way to temporarily hide the dialog (send it to the system tray) without returning from the ShowDialog() function. However, as soon as I do a <code>me.Hide()</code> in the form's code, the form is effectively hidden, but the ShowDialog() function returns and the process is closed.</p>
  
  <p>I understand this is the expected behavior. So my question is how can I get this effect? That is launch a dialog, that can be hidden, and block until the user really wants to quit the application.</p>