Folders in FolderBrowserDialog disappears!

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
 
M

Mattias Sjögren

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
 
G

Gustaf

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top