OpenFileDialog/c# slow on any file. better solution?

前端 未结 4 655
栀梦
栀梦 2020-12-16 12:34

I am opening a file using the OpenFileDialog in c# and I am noticing it is taking between 20-40 seconds to load my file and clear the dialog.

Here is my sample code

4条回答
  •  甜味超标
    2020-12-16 13:25

    Another option which helped in my case:

    OpenFileDialog ofd = new OpenFileDialog
    {
    ...
       AutoUpgradeEnabled = false
    };
    

    With this option, OpenFileDialog renders simpler UI, "pre-Vista" style according to MSDN article.

提交回复
热议问题