无网不进  
软硬件开发

Button控件获取文件夹:

1  FolderBrowserDialog fileDialog = new FolderBrowserDialog();
2  if (fileDialog.ShowDialog() == DialogResult.OK)
3  {
4     MessageBox.Show(fileDialog.SelectedPath);
5  }


Button打开磁盘文件夹:

 1 System.Diagnostics.Process.Start("explorer.exe", FilePath); 

 

posted on 2017-09-27 17:12  无网不进  阅读(1112)  评论(0编辑  收藏  举报