Setting Intitial Directory:
dlg.RootFolder = Environment.SpecialFolder.MyComputer;
dlg.SelectedPath = Settings.Default.IntialFolder;
What button was pushed:
dlg.ShowDialog() == DialogResult.OK
Using:
FolderBrowserDialog dlg = new FolderBrowserDialog();
dlg.RootFolder = Environment.SpecialFolder.MyComputer;
dlg.SelectedPath = Settings.Default.IntialFolder;
if ((dlg.ShowDialog() == DialogResult.OK)
{
\\ Some code
}
No comments:
Post a Comment