- FolderBrowserDialog dlg = new FolderBrowserDialog();
- if (!string.IsNullOrEmpty(txtPath.Text))
- dlg.SelectedPath = txtPath.Text;
- if (dlg.ShowDialog() == DialogResult.OK)
- {
- txtPath.Text = dlg.SelectedPath;
- }
- //该片段来自于http://www.codesnippet.cn/detail/100120131490.html
来源: http://www.codesnippet.cn/detail/100120131490.html