FolderBrowserDialog使用

private void button_browse_Click(object sender, EventArgs e)
        {
            FolderBrowserDialog fbd = new FolderBrowserDialog();
            fbd.Description = "请选择目录:";
            fbd.ShowNewFolderButton = true;
            fbd.RootFolder = Environment.SpecialFolder.MyComputer;
            fbd.SelectedPath = textBox_saveDir.Text;
            if (fbd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                textBox_saveDir.Text = fbd.SelectedPath;
            }
        }

 

posted @ 2014-08-31 21:00  Liu66~  阅读(661)  评论(0编辑  收藏  举报