Click to See Complete Forum and Search --> : Open a directory selection dialog using c#


GMV
March 28th, 2003, 05:51 PM
Hi, all!

How do I open a directory selection dialog using c#?
Thanks in advance

pareshgh
March 28th, 2003, 06:11 PM
string []str = Directory.GetFiles("C:\\","*.jpg");

pareshgh
March 28th, 2003, 06:13 PM
Ah ,
not the previous one,

OpenFileDialog d = new OpenFileDialog();
d.ShowDialog();

GMV
March 31st, 2003, 11:40 AM
Hi!
Thx a lot, but I think you open FileDialog, but I need a DIRECTORY selection Dialog

Thx

pareshgh
March 31st, 2003, 03:40 PM
do you have .NET 1.1 Framework,
then you have a folder option dialogbox there. since in .NET 1.0 you have to do it with using API's .

Paresh

GMV
March 31st, 2003, 04:58 PM
Yep, I found it!

System.Windows.Forms.FolderBrowserDialog

pareshgh
March 31st, 2003, 05:11 PM
yes its there in 1.1 but unfortunately 1.0 doesn't have it.

glad u found it.

Paresh;)