Is there anyway I can use the common dialogs
SaveFileDialog for example, to select a directory? Seems
it just opens the directory when I select it, and I don't
see any flags to turn that functionality off.

Thanks

Ray

Re: Selecting a directory dialog by Herfried

Herfried
Thu Jul 31 17:44:14 CDT 2003

Hello,

"Ray Price" <ray.price@gartner.com> schrieb:
> Is there anyway I can use the common dialogs
> SaveFileDialog for example, to select a directory? Seems
> it just opens the directory when I select it, and I don't
> see any flags to turn that functionality off.
.NET 1.1
"FolderBrowserDialog Class" (System.Windows.Forms.FolderBrowserDialog)
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemWindowsFormsFolderBrowserDialogClassTopic.asp

Note that there is a bug in the .NET Framework 1.1 that causes a really
bad error when using a path which is longer than ~128 characters. This
occurs on Unicode systems only. Use the P/Invoke solutions mentioned
below instead.

.NET 1.0
P/Invoke solutions:

http://www.codeproject.com/cs/miscctrl/folderbrowser.asp
http://support.microsoft.com/?kbid=306285
http://www.gotdotnet.com/team/vb/FolderBrowser.exe
http://groups.google.com/groups?selm=q0JKzDbmCHA.2144%40cpmsftngxa09

Regards,
Herfried K. Wagner
--
MVP · VB Classic, VB .NET
http://www.mvps.org/dotnet