Fork me on GitHub

FolderBrowserDialog组件选择文件夹

1、选择路径

this.folderBrowserDialog1.ShowDialog();
if (this.folderBrowserDialog1.ShowDialog() == DialogResult.OK)
{
         textBox1.Text = this.folderBrowserDialog1.SelectedPath;
}

2、设置默认路劲

this.folderBrowserDialog1.SelectedPath = @"d:\123456\xxx";

 

 

posted @ 2013-08-14 17:21  种花生的读书人  阅读(205)  评论(0编辑  收藏  举报

该博客仅作为记录笔记,转载随意