Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / January 2005

Tip: Looking for answers? Try searching our database.

Returning UNC from OpenFileDialog

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
WhiskyRomeo - 13 Jan 2005 20:39 GMT
Is there a way for the OpenFileDialog to return the UNC equivalent of the
path of a file the user selects or is there another way to discover the UNC
equivalent of the path?
Signature

wr

Herfried K. Wagner [MVP] - 13 Jan 2005 21:22 GMT
"WhiskyRomeo" <WhiskyRomeo@discussions.microsoft.com> schrieb:
> Is there a way for the OpenFileDialog to return the UNC equivalent of the
> path of a file the user selects or is there another way to discover the
> UNC
> equivalent of the path?

Notice that there is not necessarily a one-to-one mapping between local
paths and UNC paths, because there can be multiple shares.  You can use
p/invoke on 'WNetEnumResource' to get a list of shares on the server.

<URL:http://groups.google.de/groups?threadm=u7G9U0KzCHA.1768%40TK2MSFTNGP12>

Signature

M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://dotnet.mvps.org/dotnet/faqs/

WhiskyRomeo - 15 Jan 2005 00:39 GMT
Thanks for the help.

It is too bad this is not handle by .NET because it is such a common need
and it should be as simple as setting  properties in OpenFileDialog like

OpenFileDialog.ShowPath = "Normal" 'Normal path is shown to user
OpenFileDialog.ReturnUNCPath = True 'UNC path is the value returned

oh well, again thanks for the response.

Bill

> "WhiskyRomeo" <WhiskyRomeo@discussions.microsoft.com> schrieb:
> > Is there a way for the OpenFileDialog to return the UNC equivalent of the
[quoted text clipped - 7 lines]
>
> <URL:http://groups.google.de/groups?threadm=u7G9U0KzCHA.1768%40TK2MSFTNGP12>

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.