简体   繁体   中英

FolderBrowseDialog to browse folder of server computer from client computer

I want to open the directory of server computer using FolderBrowserDialog from the client machine. Is it possible?

I have searched for it n haven't found the solution.

I have found others such as to browse Network Folders , here: How-to-Browse-Network-Folders-using-Folder-Dialog .

But i am looking for to browse the directory of server from the client .

here is a snippet that works fine with .net 4:

Dim dlg As New FolderBrowserDialog()
dlg.SelectedPath = "\\yourServer\share"

If dlg.ShowDialog() = DialogResult.OK Then
    Dim selected = dlg.SelectedPath
    ' ...
End If

no need for RootFolder or any hacking - this will open the dialog on my computer (both client/server are windows-OS in a windows-domain) at the network-share and let my trill down into the folders there - at the end you will get a string like \\\\yourServer\\share\\selected\\path back

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM