private void button2_Click(object sender, EventArgs e)
{
FolderBrowserDialog dlg = new FolderBrowserDialog();
dlg.SelectedPath = Path.GetFullPath(".");
if (dlg.ShowDialog() == DialogResult.OK)
{
string path = dlg.SelectedPath;
MessageBox.Show("选中了:" + path);
}
}
c#winform中选择目录对话框
最新推荐文章于 2025-02-14 09:13:04 发布