FolderBrowserDialog issues

Dec 5 2006 8:12 PM
Hello, I'm having an issue with the FolderBrowserDialog class inside a custom installer script that I've written into my application.

What I'm trying to do:
When a user installs my application, they are prompted to fill out a form with data required for the application to run correctly. This is shown from a custom action in the Install portion of the setup project for the application. On this form are Browse buttons that open a FolderBrowserDialog so that the user can select a directory on their system that fills the requirements of the field.

What the issue is:
When the user clicks the Browse button and the FolderBrowserDialog opens, the only controls on the form are the buttons (Make New Folder, OK, Cancel)...the treeview control to navigate the directory structure is missing. When I run a modified version of the config form from within the actual application (it uses the exact same code as pertaining to the FolderBrowserDialog usage), the treeview control is present and works normally.
The only information I found on the web says that making sure that the [STAThread] attribute is on the Main() method of the application will fix it, but that is in relation to running the actual program executable and not from a custom action in the setup project. Even still, the [STAThread] attribute is there and it has no effect on the installer config form (even though the code for the installer config form is actually inside the main program assembly).

Any insight or assistance would be greatly appreciated. If any clarification is needed (because I'm not too great at explaining things), please reply and I will do my best to clarify any confusion.

Thanks,
Christoff

Answers (1)