Folders in FolderBrowserDialog disappears!

  • Thread starter Thread starter Gustaf
  • Start date Start date
G

Gustaf

Using VS.NET 2003 with all the 1.1 framework updates. I've been
subjected to this bug in 2 separate projects, and in both cases, I've
found no way back other than starting from scratch again (which I
haven't done yet).

What happens is that the TreeView with the folders in every
FolderBrowserDialog disappears. It happens totally spontaneous, from one
build to the other. When it has happened, it appears to be no way back.
This screen dump illustrates the symptom:

http://gusgus.cn/temp/FolderBrowserDialogBug.png

I've tried all the obvious things like restarting VS, replacing the
FolderBrowserDialog control, and reloading the contol. What more can I
do to make it work again?

Gustaf
 
Gustaf,
What more can I do to make it work again?

This is usually caused by not showing the dialog on an STA thread.
Make sure you ahve the [STAThread] attribute on your Main method if
you show the dialog from your main thread.


Mattias
 
Mattias said:
This is usually caused by not showing the dialog on an STA thread.
Make sure you ahve the [STAThread] attribute on your Main method if
you show the dialog from your main thread.

Wow! Someone must have worked hard to figure out that connection! Thanks
for sharing. Problem solved. :-)

Gustaf
 
Back
Top