Re: OpenFileDialog (C#)

From: Herfried K. Wagner [MVP] (hirf-spam-me-here_at_gmx.at)
Date: 08/18/04


Date: 18 Aug 2004 22:21:09 +0200


* "John Beard" <john.beard@fsafood.com> scripsit:
> Does anybody know if STAThread is a requirement when using OpenFileDialog?
> I have an app that is using MTAThread Form and the OpenFileDialog hangs on
> the OpenDialog() method under Win2k. No problems under WinXP.

Yes, it is a requirement because the OpenFileDialog relies on COM/OLE.

-- 
 M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
 V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>


Relevant Pages

  • OpenFileDialog.RestoreDirectory no longer works in Vista after installing VS 2008
    ... I have an app that relies on OpenFileDialog to change the current ... working directory based on the user selection (i.e. ... But after I install VS 2008 (which also installed ...
    (microsoft.public.dotnet.framework.windowsforms)
  • OpenFileDialog Initial Directory not working
    ... OpenFileDialog to be a subfolder within the same folder as the app, ... Is there something special about an app path that a file dialog doesn't ...
    (microsoft.public.dotnet.languages.csharp)
  • OpenFileDialog (C#)
    ... I have an app that is using MTAThread Form and the OpenFileDialog hangs on ... the OpenDialog() method under Win2k. ...
    (microsoft.public.dotnet.framework.windowsforms.controls)