我希望在C#中默认打开FolderBrowserDialog中的最后一个文件夹

时间:2015-10-15 11:22:50

标签: c# directory default subdirectory folderbrowserdialog

这是我在C#中的源代码:

private void button11_Click(object sender, EventArgs e)
{
    FolderBrowserDialog fbd = new FolderBrowserDialog();

    fbd.SelectedPath = Directory.GetCurrentDirectory() + "\\Slides";

    DialogResult result = fbd.ShowDialog();
}

单击按钮时,将显示FolderBrowserDialog。我的问题是,默认情况下,ShowDialog表单中没有打开名为Slides here的最后一个文件夹。

当显示对话框时我想要这样的东西:

enter image description here

当幻灯片的子目录关闭时,不是这样的:

enter image description here

注意:幻灯片目录中可以有不同的文件夹。

0 个答案:

没有答案