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

查看:130
本文介绍了打开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文件夹)传递给应用程序。据我可以告诉从 OpenFileDialog有关msdn的文档无法禁用此行为。

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天全站免登陆