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;
}
}
标签:FolderBrowserDialog,C#,private,DialogResult,dilog,文件夹,窗体,ShowDialog 来源: https://www.cnblogs.com/zhaiganggang/p/14154969.html