This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- FolderBrowserDialog .NET DLL Custom Action not showing folder tree
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 04, 2011
06:33 PM
FolderBrowserDialog .NET DLL Custom Action not showing folder tree
I built a static method in a .NET DLL that does this:
System.Windows.Forms.FolderBrowserDialog dialog = new System.Windows.Forms.FolderBrowserDialog();
dialog.ShowDialog();
When the dialog is shown, it doesn't contain the folder tree:
http://imgur.com/fpycL&MrgOH
Then if I cancel it and show it again it shows up!
http://imgur.com/fpycL&MrgOHl
minus the black box of course.
What's wrong here?
System.Windows.Forms.FolderBrowserDialog dialog = new System.Windows.Forms.FolderBrowserDialog();
dialog.ShowDialog();
When the dialog is shown, it doesn't contain the folder tree:
http://imgur.com/fpycL&MrgOH
Then if I cancel it and show it again it shows up!
http://imgur.com/fpycL&MrgOHl
minus the black box of course.
What's wrong here?
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 05, 2011
10:03 AM
I figured it out. I have to run the call in a single-threaded apartment. I guess IS2011 is calling it as on a non-UI thread.
![](/skins/images/CC38E504FC9E1309DC48ACFEB4925670/responsive_peak/images/icon_anonymous_message.png)