private void button1_Click(object sender, EventArgs e) { folderBrowserDialog1.ShowNewFolderButton = true;//是否显示新建的文件夹选项 DialogResult dr = folderBrowserDialog1.ShowDialog();//显示选择文件夹对话框 if (dr == DialogResult.OK) { MessageBox.Show(folderBrowserDialog1.SelectedPath, "选择的路径");//显示选择的路径 } }
确定文件的位置--浏览文件夹对话框folderBrowserDialog
原文:http://www.cnblogs.com/leijiangtao/p/4163830.html