如何在桌面上的右键菜单中添加项目 [英] How can I add an item to the right click menu on the desktop

查看:125
本文介绍了如何在桌面上的右键菜单中添加项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在后台运行的应用程序,该应用程序会按设置的时间间隔更改用户的桌面背景。除了正常的Windows右键单击选项之外,我希望用户可以右键单击桌面背景,并可以选择下载照片或前进到下一个背景。在C#中有什么方法可以做到这一点?

I have an application that runs in the background and changes the user's desktop background at set intervals. I would like to make it possible for the user to right click the desktop background and have the option to download the photo or advance to the next background, in addition to the normal windows right click options. Is there any way to do this in C#?

目标操作系统是Windows 8.1,但是如果它可以在多个Windows版本上运行,那就太好了。

The target OS is Windows 8.1, but if it could work across several versions of Windows, that would be great.

感谢kennyzx建议使用 Sharp Shell上下文菜单。对于那些还不习惯使用某些更深的C#概念的人来说,这是一个相对容易理解的库。

Thanks to kennyzx for suggesting Sharp Shell context menu. It's a relatively easy library to understand for someone who is not use to using some of the deeper C# concepts yet.

推荐答案

最简单的方法是编辑注册表 HKEY_CLASSES_ROOT\DesktopBackground\shell 如此处所述。.
http://www.howtogeek.com/107965/how-to-add-any-application-shortcut-to-windows-explorers-context-menu/

The easiest way is to edit registry HKEY_CLASSES_ROOT\DesktopBackground\shell as described here.. http://www.howtogeek.com/107965/how-to-add-any-application-shortcut-to-windows-explorers-context-menu/

这篇关于如何在桌面上的右键菜单中添加项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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