C# 选择文件目录对话框

winform(C#)需要让用户手动选择一个文件目录的路径,弹出路径选择框,代码如下:

FolderBrowserDialog fbd = new FolderBrowserDialog();
DialogResult result = fbd.ShowDialog();

if (result == DialogResult.OK && !string.IsNullOrWhiteSpace(fbd.SelectedPath))
{
     //tbxBackupPath.Text = fbd.SelectedPath;
}

猜你喜欢

转载自blog.csdn.net/zhouyingge1104/article/details/88526903
今日推荐