自定义文件扩展名图标 [英] Custom File Extension Icon

查看:149
本文介绍了自定义文件扩展名图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了一个应用程序,即记事本应用程序.我想用我自己的扩展名保存它,因为我已经做到了.现在我要做的是,当我使用扩展名保存文件时,应该设置图标.例如当您保存任何Microsoft Word文件时,图标都会设置在文件保存的位置.
另一项工作是,当我尝试打开从我的应用程序创建的文件时,然后右键单击该文件,它应在打开方式"部分中显示该选项.
提前致谢!!! :)

I have created a application i.e Notepad Application. and I want to save it using my own extension, that i have done it. now what I want to do is that when I save my file with my extension the icon should be set. for eg. when you save any microsoft word file the icon is set where ever the file is saved.
Another work is when ever I try to open the file created from my application, then after you right click the file it should show the option in the "open with" section.
Thanks in Advance!!! :)

推荐答案

好吧...

为您的文件使用自定义图标非常容易.只是您需要注册文件类型.

.NET安装程序安装程序具有此功能,并且效果很好.

另一件事,如果您想使用双击打开该特定文件的应用程序,则也可以轻松地执行此操作.
只需要更改一些注册表项就可以了.

看看我在应用程序中是如何做到的:
使用C#& Windows Shell菜单上的文件夹概念 [ ^ ]

希望对您有帮助.

干杯. :cool:
Well...

It is very easy to have custom ICON for your files. Just you need to register the file type.

.NET Installer setup have this facility and it works great.

Another thing, if you want to use Double click to open your application for that particular file you can also do this easily.
Just you need to change some registry keys and you are done.

See how I did that in my application :
Folder protection for windows using C# & Concepts on Windows Shell menu for Folders[^]

I hope this will help you.

Cheers. :cool:


这篇关于自定义文件扩展名图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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