Directory Picker Pro in C#


Windows 2000 Screen Dump 

In my latest project I needed a dialog for picking a directory. I searched through the web, but found nothing that looked nice. First of all I wanted a TreeView for display, and I wanted to view all system drives (with correct names and icons). 

First of all I want to cred two dudes called odah  and Parvez Ahmad Hakim. They have written articles about getting icons and drive information with the Interop service.

How to use:

DirPicker DP = new DirPicker();
DP.ShowDialog();
if(DP.Result==DirectoryPickerResponse.Ok)
{
MessageBox.Show("Ok: "+ DP.SelectedDirectory);
}
else
{
MessageBox.Show("Cancel!");
}

Simple huh?

Up Next
    Ebook Download
    View all
    Learn
    View all