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

前端 未结 4 653
栀梦
栀梦 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:17

    I had the same problem, openFileDialog1.ShowDialog() was slow, taking 10 seconds after closing it to execute the next line of my program. I noticed in the dialog that I had a couple old shortcuts under "Computer" pointing to webdav url's which were no longer valid. I deleted these shortcuts from windows explorer, and the program is fast now. Check if you have any network connection shortcuts tied to your computer, which also display in the dialog (on the left-hand panel in Windows 7). Try removing them and see if the dialog is faster.

提交回复
热议问题