选择一个文件夹
FolderBrowserDialog FilesPath = new FolderBrowserDialog();if (FilesPath.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
FilePath = FilesPath.SelectedPath;
}
初始化一个已知路径:
FolderBrowserDialog FilesPath = new FolderBrowserDialog();
if (this.tB_InitPath.Text != null)
{
FilesPath.SelectedPath = this.tB_InitPath.Text.ToString();
}
if (FilesPath.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
InitFilePath = FilesPath.SelectedPath;
}
页:
[1]