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
You can use a free tool like ProcExp (SysInternals.com) to monitor what your application is doing during the lag. Is it scanning the file system? The registry? The network (maybe it is trying to connect to a network share that is slow to respond).
BTW, you can run ProcExp.exe without installing it from http://live.sysinternals.com/!