Skip to content

Window doesn't show under VS 2015 #4

@reubengann

Description

@reubengann

Hi, I imported OpenFileOrFolderDialog.cs, InteropUtil.cs, InternalErrorException.cs, and Util.cs into my Visual C# project, then following the example code, made a button and attached code
`private void LoadFolderButton_Click(object sender, EventArgs e)
{
using (OpenFileOrFolderDialog folderBrowserDialog1 = new OpenFileOrFolderDialog())
{
folderBrowserDialog1.AcceptFiles = false;
folderBrowserDialog1.Path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
folderBrowserDialog1.ShowDialog();
}

}`

However, no window shows up. I traced the code, and as soon as the OpenFileOrFolderDialog constructor ends, the body of the using block is executed. There are no compilation errors or anything, just nothing shows up. I'm targeting .NET 4.5.2, if that matters. Is this a known limitation or is there something I can do here?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions