Halcom 发表于 2019-5-11 19:00:26

选择一个文件夹

FolderBrowserDialog FilesPath = new FolderBrowserDialog();
            if (FilesPath.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                FilePath = FilesPath.SelectedPath;
            }

Halcom 发表于 2019-7-18 22:36:19

初始化一个已知路径:
            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]
查看完整版本: 选择一个文件夹