1.选取文件夹的
FolderBrowserDialog fbd = new FolderBrowserDialog();
fbd.SelectedPath = "D:\Test";
if(fbd .ShowDialog() == DialogResult.OK)
{
   this.textbox1.Text = fbd.SelectedPath;
}

2.选取文件使用OpenFileDialog,    代码雷同

05-11 21:59