OpenFileDialog too slow

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi im trying to create and show an openfiledialog to let the user selecta
file but the control is too slow.
When i call showdialog on it it takes too long for it to appear on screen
and when i move between folders it takes too much time to update it. Whhat
can be producing this behaviour????
 
I've seen something similar once with removed server that is Windows was
trying to contact a removed server because it was registered in favorites, a
recent file list or something similar... A bad AV update or some background
activity like index server could also slow down things...

The first step would likely be to see if you have the same problem on
another machine to see if it looks like machine specific or not...

Good luck.
 
Do you have the same problem in Excel or Word? If so the issue is Windows.
If not, I'd take a look at the code around the dialog open.

Mike Ober.
 
no i havent the same problem in word or excel.
The code is only this:
i have a form and a button on that form. The click event of the button is
managed by this method

openFileDialog1.InitialDirectory =
System.Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
if (DialogResult.OK == openFileDialog1.ShowDialog())
{
textBox1.Text = openFileDialog1.FileName;
}
 
Mapped network drive or shortcut to network shared folder could possibly
slow this down as windows needs to query the mapped network drive or
shared folder for the folder content (which involves making connection
to other windows machine). Do you have any map network drive? I really
susppect that this is the problem.

Tong


The code looks just fine to me.
 
Back
Top