C# 对话框之FolderBrowserDialog
作者:互联网
-
//folder控件描述Environment.SpecialFolder.Desktop;
folderBrowserDialog1.Description = "请选择一个包含TXT格式的文件夹:";
//指定folder根=桌面
folderBrowserDialog1.RootFolder = Environment.SpecialFolder.Desktop;
//是否添加新建文件夹的按钮
folderBrowserDialog1.ShowNewFolderButton = true;
if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
{
richTextBox1.Text = folderBrowserDialog1.SelectedPath;
}
标签:FolderBrowserDialog,C#,对话框,Desktop,Environment,文件夹,SpecialFolder,folderBrowserDi 来源: https://blog.51cto.com/u_14568060/2812245