-
//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;
}