How do I use the OpenFileDialog class (in C#, WPF etc.) such that it opens on the Network area as default?

This does not work:

OpenFileDialog openFileDialog1 = new OpenFileDialog();
openFileDialog1.InitialDirectory = "Network";

I also tried having "\\" as an InitialDirectory and that did not work.

I also tried having "\\\\" as an InitialDirectory and that did not work either.

Try this

openFileDialog1.InitialDirectory = "::{208D2C60-3AEA-1069-A2D7-08002B30309D}";

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.