title: call OpenFileDialog from powershell
body: <p>When I run the following, PowerShell hangs waiting for the dialog to close, even though the dialog is never displayed:</p>
  
  <pre><code>[void] [Reflection.Assembly]::LoadWithPartialName( 'System.Windows.Forms' )
  $d = New-Object Windows.Forms.OpenFileDialog
  $d.ShowDialog( )
  </code></pre>
  
  <p>Calling <code>ShowDialog</code> on a <code>Windows.Forms.Form</code> works fine. I also tried creating a <code>Form</code> and passing it as the parent to <code>$d.ShowDialog</code>, but the result was no different.</p>