关联文件类型和图标 [英] Associate File Type and Icon

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

问题描述

好的,我已经查看了所有内容,但我很难弄清楚如何将自定义文件类型与我的 C# 应用程序相关联.我正在使用 Visual Studio 2008 并且由于公司部署而仅限于 .NET 2.0.

Ok, I have looked all over and I am having a difficult time trying to figure out how to associate a custom file type with my C# application. I am using Visual Studio 2008 and am limited to .NET 2.0 due to company deployment.

基本上我真正想要做的就是允许用户双击我的自定义文件类型或将其拖放到应用程序图标上并加载数据,以及在文件本身上显示自定义图标.我可以通过对话框打开文件,一切正常.

Basically all I really want to do is be able to allow the user to double click my custom file type or drag and drop it on the app icon and it load the data, as well as display a custom icon on the file itself. I can open the file via a dialog box and everything works great.

尝试阅读 Micosoft 的在线文档很难理解,而且并没有真正提供我需要的所有详细信息.如果有人知道我可以在哪里找到好的教程或可以解释它,我将不胜感激.

Trying to read Micosoft's online documents is hard to understand and does not really give me all the details that I need. If anyone out there know's where I can find a good tutorial or can explain it I would appreciate it.

谢谢帕特里克

推荐答案

这篇 CodeProject 文章 有一些源代码通过代码演示文件关联.

This CodeProject article has some source code demonstrating file association by code.

这篇关于关联文件类型和图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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