在浏览按钮点击事件里写:
OpenFileDialog ofd =new OpenFileDialog();
if(ofd.ShowDialog() == DialogResult.Ok)
{
string path = ofd.FileName;
}
这就是路径了。
FolderBrowserDialog folderDlg = new FolderBrowserDialog();
if (folderDlg.ShowDialog() == DialogResult.OK)
{
string path= folderDlg.SelectedPath;
}
连话都说不清楚么,念都念不通