OpenFileDialog

S

SQL

Hi,

Can the OpenFileDialog be used just for folders...I want the user to only
select a folder in which the files exist. Or is there something else I
should be using?

Thanks.
 
H

Herfried K. Wagner [MVP]

* "SQL said:
Can the OpenFileDialog be used just for folders...I want the user to only
select a folder in which the files exist. Or is there something else I
should be using?

My FAQ:

..NET 1.1:

FolderBrowserDialog Class (System.Windows.Forms.FolderBrowserDialog)
<URL:http://msdn.microsoft.com/library/e...WindowsFormsFolderBrowserDialogClassTopic.asp>

Note that there is a bug in the .NET Framework 1.1 that causes a really bad
error when using a path longer than about 128 characters. This occurs on
Unicode systems only. Use the p/invoke solutions listed below instead.

..NET 1.0:

Folder Browser component for .NET
<URL:http://www.codeproject.com/cs/miscctrl/folderbrowser.asp>

306285 – HOW TO: Implement a Managed Component that Wraps the Browse For
Folder Common Dialog Box by Using Visual C# .NET
<URL:http://support.microsoft.com/?kbid=306285>

FolderBrowser.msi
<URL:http://www.gotdotnet.com/team/vb/FolderBrowser.exe>

How to pick a directory
<URL:http://groups.google.com/groups?selm=q0JKzDbmCHA.2144@cpmsftngxa09>
 
C

Cor Ligthert

Hi,

In addition to Herfried,
Note that there is a bug in the .NET Framework 1.1 that causes a really bad
error when using a path longer than about 128 characters. This occurs on
Unicode systems only. Use the p/invoke solutions listed below instead.

As far as I know is this bug also in Visual Studio Net when you use paths
which are longer than 128 characters it gets strange behaviours.

Cor
 

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