简体   繁体   English

FolderBrowseDialog从客户端计算机浏览服务器计算机的文件夹

[英]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. 我想使用客户端 计算机上的 FolderBrowserDialog打开服务器计算机目录 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: 这是一个可与.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 无需RootFolder或任何黑客入侵-这将在网络共享上打开我计算机上的对话框(客户端/服务器均为Windows域中的Windows-OS),并让我的琐事进入那里的文件夹-最后,将获得类似\\\\yourServer\\share\\selected\\path的字符串

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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