VB.NET - dribox - Asked By hiren dhameliya on 24-Oct-10 06:07 AM

i want implement Drive box in combo box and directory box in vb.net as compare in vb dribox and dvrbox
anil soni replied to hiren dhameliya on 24-Oct-10 06:13 AM
If you want to have directory or file selection dialog box then you can use FolderBrowserDialog or OpenFileDialog.

Sample code for the same are shown below

FolderBrowserDialog fbDialog = new FolderBrowserDialog();

if (fbDialog.ShowDialog() == DialogResult.OK)

Console.WriteLine("Selected folder: " + fbDialog.SelectedPath);

OpenFileDialog ofDialog = new OpenFileDialog();

if (ofDialog.ShowDialog() == DialogResult.OK)

Console.WriteLine("Selected file: " + ofDialog.FileName);

Its much much simpler and easy approach for the same.