tom
Thu Oct 02 05:13:09 CDT 2003
Hi,
many thanks for your help. I think you're right about what is
happening. It would certainly be nice if it didn't wait for several
minutes!
Do you know how I can fine out the directory that the OpenFileDialog
is going to try and go to before I run the dialog to do the check. The
OpenFileDialog will allow me to set the InitialDirectory, but not find
out what it's current value is.
Thanks,
Tom
"Dmitriy Lapshin [C# / .NET MVP]" <x-code@no-spam-please.hotpop.com> wrote in message news:<Opg#P7zgDHA.1760@TK2MSFTNGP09.phx.gbl>...
> Hi Tom,
>
> I have seen this hanging in an old version of Media Player - so it is not a
> pure .NET problem. Actually, it does not hang - it just waits for several
> minutes until network connection times out. You could possibly avoid the
> waiting by disabling this feature on the OpenFileDialog (it should have a
> boolean property called something like RestoreDirectory) and providing
> similar functionality manually - with a view of probing the stored path if
> it is a network one before showing the Open File dialog.
>
> --
> Dmitriy Lapshin [C# / .NET MVP]
> X-Unity Test Studio
>
http://x-unity.miik.com.ua/teststudio.aspx
> Bring the power of unit testing to VS .NET IDE
>
> "Tom Harris" <tom.harris@red-gate.com> wrote in message
> news:929f763b.0309240815.24c3ad0d@posting.google.com...
> > Hi there,
> >
> > has anyone run into this problem? I have a simple winforms app that
> > uses the OpenFileDialog to open a file. If I choose to open a file
> > from a different machine on my network everything is fine. However, if
> > I now close down my app and shutdown the other machine and try again
> > the OpenFileDialog hangs. The call stack shows that it is waiting in
> > RunFileDialog.
> >
> > It looks as though the app persists the current directory somewhere,
> > but runs into trouble when that path is no longer available. When I
> > try the same thing with Word it goes back to My Documents when the
> > network path is not available.
> >
> > Any ideas?
> >
> > Thanks,
> >
> > Tom