使用FolderBrowserDialog显示快捷方式 [英] To show shortcuts with FolderBrowserDialog

查看:493
本文介绍了使用FolderBrowserDialog显示快捷方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法使用FolderBrowserDialog显示快捷方式。



我用Google搜索,但最接近的解决方案是使用SaveFile Dialog - 这对我不起作用。



我知道快捷方式不是文件或文件夹,但我仍想在FileBrowse对话框中显示它们。

Is there a way to show shortcuts using FolderBrowserDialog.

I have googled, but the closest solution is to use SaveFile Dialog - which wont work for me.

I know that shortcuts are not files or folders, but still I want to show them in FileBrowse dialog.

推荐答案

你好Lakamraju Raghuram,



我只是使用普通的OpenFileDialog而不是FolderBrowserDialog和一个过滤器的快捷方式



Hi Lakamraju Raghuram,

I'd just use the normal OpenFileDialog instead of the FolderBrowserDialog with a Filter for Shortcuts

OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "Shortcut|.ink";





但我不明白你的要求 - 你怎么知道快捷方式指向一个文件夹?无论如何,上面的解决方案应该不费吹灰之力 - 当然你总是可以编程你的SpecialDialog - 但我猜你的要求只是垃圾...也许你想再考虑一下?



亲切的问候约翰内斯



But I don't understand your requirement - how would you know that the shortcut Points to a folder? Anyway above solution should work with no effort - of course you can always program your "SpecialDialog" - but I'd guess your requirement is just "rubbish"... maybe you want to think about it again?

Kind regards johannes


这篇关于使用FolderBrowserDialog显示快捷方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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