打开 FTP 位置的文件对话框 [英] Open File Dialogue for FTP location

查看:25
本文介绍了打开 FTP 位置的文件对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当用户浏览到 ftp 位置时,我遇到了打开文件对话的问题.我从 openFileDialogue 获得的路径是本地路径(本地设置临时文件夹),而不是我选择的实际 ftp 路径.如何获取实际的 ftp 路径.

I have an issue with open file dialogue when the user browse into an ftp location. The path i get from the openFileDialogue is a local path (Local Setting temp folder) instead of the actual ftp path I selected. How to get the actual ftp path.

推荐答案

您在哪个版本的 Windows 上运行/测试?

What version of Windows are you running/testing on?

Windows 7 有一个功能(不确定它是否也在 Vista 中,甚至可能是 XP),如果您指定一个 Web 位置(无论是 http 还是 ftp),Windows 会从该位置下载文件并传递路径下载的文件,因此 Temp 文件夹,应用程序.据我所知,msdn 上的 OpenFileDialog 文档 无法禁用此行为.

There's a feature of Windows 7 (not sure if it's in Vista as well, or perhaps even XP) where if you specify a web location (be it http or ftp), Windows downloads the file from that location and passes the path of the downloaded file, hence the Temp folder, to the application. As far as I can tell from the OpenFileDialog documentation on msdn there's no way to disable this behaviour.

您必须推出自己的实现,或者看看是否有一个 PInvoke 方法可以用来说服它不要表现出这种行为.

You'll have to either roll your own implementation, or see if there's a PInvoke method you can use to persuade it not to exhibit this behaviour.

这篇关于打开 FTP 位置的文件对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆