FolderBrowserDialog is empty

  • Thread starter Thread starter Davy Brion
  • Start date Start date
D

Davy Brion

Hey,

i'm sure i overlooked something silly, but for some reason if i try to
use the FolderBrowserDialog.ShowDialog method, the dialog does not
show a treeview containing folders... the dialog only contains the
button to create a new folder (which also doesn't do anything) and
the Ok and Cancel buttons.

I get this behaviour no matter what value i assign to the RootFolder
property before calling the ShowDialog method.

Does anyone know what i'm doing wrong here?

thx

ps: using .NET 1.1 with SP1 on XP Pro SP2

--
 
* "Davy Brion said:
i'm sure i overlooked something silly, but for some reason if i try to
use the FolderBrowserDialog.ShowDialog method, the dialog does not
show a treeview containing folders... the dialog only contains the
button to create a new folder (which also doesn't do anything) and
the Ok and Cancel buttons.

Make sure the 'STAThread' attribute is specified on your application's
entry point (not 'MTAThread'). 'STAThread' is the default, so it
doesn't need to be explicitly added to your 'void Main'/'Sub Main'.
 
Make sure the 'STAThread' attribute is specified on your application's
entry point (not 'MTAThread'). 'STAThread' is the default, so it
doesn't need to be explicitly added to your 'void Main'/'Sub Main'.

thx, that fixed it :)

--
 
Any article or links which discusses this behavior for folderbrowserdialog
on Multithreaded apps Mr. Wagner?

Thanx...
 
* "Joey Callisay said:
Any article or links which discusses this behavior for folderbrowserdialog
on Multithreaded apps Mr. Wagner?

I don't have an article in mind, but for Windows Forms Apps I'd use
'STAThread' to avoid problems when components make use of COM interop.
 
ok thanx

Herfried K. Wagner said:
I don't have an article in mind, but for Windows Forms Apps I'd use
'STAThread' to avoid problems when components make use of COM interop.
 
Back
Top