C#打开窗体获取文件夹
private void button5_Click(object sender, EventArgs e)
{
FolderBrowserDialog dilog = new FolderBrowserDialog();
dilog.Description = “请选择文件夹”;
if (dilog.ShowDialog() == DialogResult.OK || dilog.ShowDialog() == DialogResult.Yes)
{
textBox5.Text = dilog.SelectedPath;
}
}