如何创建我的自定义外壳上下文处理程序的Windows? [英] How can I create my custom Shell Context Handlers for Windows?

查看:90
本文介绍了如何创建我的自定义外壳上下文处理程序的Windows?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

语言:C#2.0或更高版本

Language: C# 2.0 or later


我想注册的上下文句柄创建menues当用户右键点击某些文件(在我的情况* .eic)。什么是注册,从这些menues注销(清理)和处理事件(点击)?程序

I would like to register context handlers to create menues when the user right clicks certain files (in my case *.eic). What is the procedure to register, unregister (clean up) and handle events (clicks) from these menues?

我有一个线索,它是与Windows注册表中,但考虑到有多少东西,有在.net中,我也不会感到惊讶,如果有方便的方法来做到这一点干净,方便。

I have a clue it's something to do with the windows registry, but considering how much stuff there is in .net, I wouldn't be surprised if there are handy methods to do this clean and easy.

code片段,网站引用,评论等都是不错的。请折腾他们看着我。

Code snippets, website references, comments are all good. Please toss them at me.


显然有一个小问题在托管语言创建上下文menues,几个用户评论。有没有达到同样的行为,任何其他preferred的方式,或者我应该花时间寻找到这些变通办法?我不介意做,在所有的,我很高兴人们提出的努力使这成为可能 - 但我还是想知道是否有一个正确的/干净实现这一目标的方式

Obviously there is a slight problem creating context menues in managed languages, as several users have commented. Is there any other preferred way of achieving the same behaviour, or should I spend time looking into these workarounds? I don't mind doing that at all, I'm glad people have put effort into making this possible - but I still want to know if there is a "proper/clean" way of achieving this.

推荐答案

抵抗托管语言编写外壳扩展 - 有许多事情可以去砰如果你追求这条路线

Resist writing Shell Extensions in managed languages - there are a multitude of things that could go bang if you pursue this route.

曾经使用过此线程浏览更多的细节。它包含指向这样做,如果真的想要,并且一本正经地的原因是可以做到的建议,但不应该。

Have a browse through this thread for more details. It contains links to do it if really want, and sagely advice of why it can be done, but shouldn't.

<一个href="http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/1428326d-7950-42b4-ad94-8e962124043e/" rel="nofollow">http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/1428326d-7950-42b4-ad94-8e962124043e/

您又回到非托管的C / C ++作为这里的唯一真正的工具。

You're back to unmanaged C/C++ as your only real tools here.

这篇关于如何创建我的自定义外壳上下文处理程序的Windows?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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