简体   繁体   English

C# 如何将我的程序添加到上下文菜单?

[英]C# How to add my program to context menu?

I have a c# executable file (created from a windows form application) and I would like to be able to add this file to the context menu.我有一个 c# 可执行文件(从 windows 表单应用程序创建),我希望能够将此文件添加到上下文菜单中。 Furthermore, I should point out that I need to be able to add it to Windows XP, Vista, and 7.此外,我应该指出,我需要能够将它添加到 Windows XP、Vista 和 7。

Thank you for any help,感谢您的任何帮助,

It is not that difficult and it is called context menu.这并不难,它被称为上下文菜单。 Check this out Add a context menu to the Windows Explorer Basically you will need to add item to the Registry.ClassesRoot.CreateSubKey registry.检查这一点将上下文菜单添加到 Windows 资源管理器基本上您需要将项目添加到 Registry.ClassesRoot.CreateSubKey 注册表。

Yeah add context menu using Registry editor.是的,使用注册表编辑器添加上下文菜单。 You could do this manually.您可以手动执行此操作。 Or this method, for example MSDN LINK , but you only need to do it once.或者这种方法,例如MSDN LINK ,但您只需要执行一次。 so its like a installer executed once.所以它就像一个安装程序执行一次。 here another simple example Link这里是另一个简单的例子链接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM