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);
时间: 2024-11-05 21:51:28