Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / General / February 2004

Tip: Looking for answers? Try searching our database.

Folder Browser Dialog Doesn't show directory tree

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
CBROC - 24 Feb 2004 16:26 GMT
I'm trying to write a Visual Studio.net 2003 macro that will display a FolderBroswer Dialog.   When the code below executes, the FolderBrowser dialog is displayed with 3 buttons (Ok, Cancel, New Folder), but there is no tree control displaying directories

Sub SetSandboxRoot(
       Dim FindSandboxPathDlg As New System.Windows.Forms.FolderBrowserDialo
       REM FindSandboxPathDlg.Description = "Select the directory where your sandbox is located.
       REM FindSandboxPathDlg.ShowNewFolderButton = Fals
       FindSandboxPathDlg.ShowDialog(
   End Su

I've tried many combinations of setting various properties before calling ShowDialog but the result is the same

Can anyone please help!

Thanks
Chris
Vincent Finn - 25 Feb 2004 16:31 GMT
>I'm trying to write a Visual Studio.net 2003 macro that will display a FolderBroswer Dialog.   When the code below executes, the FolderBrowser dialog is displayed with 3 buttons (Ok, Cancel, New Folder), but there is no tree control displaying directories.
>
[quoted text clipped - 8 lines]
>
>Can anyone please help!!

I pasted your code into a new VB.Net project and ran it
BrowseDialog appeared with the treeview

Sounds like something may be corrupt in your installation

    Vin
CBROC - 26 Feb 2004 18:01 GMT
Vince

Thanks for taking the time to try my code in a vb.net application.

As I mention in my original post, I'm trying to use the Folder Browser dialog from a VS.NET macro.  Maybe that is part of the issue?  I've seen some posts concerning the use of the [STAThread] attribute on the method that displays the dialog. Since I can't set this attribute on macro functions, I'm now thinking that I may have to write a VS.NET addin (DLL) to get and call that from the macro to get the dialog to display

I've had no trouble displaying other common dialogs (like the FileOpen dialog) from macro code. I have no clue why displaying Folder Browser Dialog from macro code should be so different or difficult

Thank
Vincent Finn - 27 Feb 2004 19:25 GMT
>Vince,
>
>Thanks for taking the time to try my code in a vb.net application.
>
>As I mention in my original post, I'm trying to use the Folder Browser dialog from a VS.NET macro.  Maybe that is part of the issue?  I've seen some posts concerning the use of the [STAThread] attribute on the method that displays the dialog. Since I can't set this attribute on macro functions, I'm now thinking that I may have to write a VS.NET addin (DLL) to get and call that from the macro to get the dialog to display.

Sorry missed that

>I've had no trouble displaying other common dialogs (like the FileOpen dialog) from macro code. I have no clue why displaying Folder Browser Dialog from macro code should be so different or difficult.

You could try using PInvoke to call the API directly instead.

    Vin

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.