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); 

 

相关文章:

  • 2022-12-23
  • 2021-12-14
  • 2021-10-21
  • 2022-12-23
  • 2021-09-04
  • 2022-12-23
猜你喜欢
  • 2021-11-30
  • 2022-12-23
  • 2021-05-27
  • 2022-12-23
  • 2021-05-15
  • 2022-12-23
  • 2021-07-12
相关资源
相似解决方案