[英]How can I add an item to the right click menu on the desktop
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. 除了正常的Windows右键单击选项之外,我希望用户可以右键单击桌面背景,并可以选择下载照片或前进到下一个背景。 Is there any way to do this in C#? 在C#中有什么方法可以做到这一点?
The target OS is Windows 8.1, but if it could work across several versions of Windows, that would be great. 目标操作系统是Windows 8.1,但是如果它可以在Windows的多个版本中使用,那就太好了。
Thanks to kennyzx for suggesting Sharp Shell context menu . 感谢kennyzx建议使用Sharp Shell上下文菜单 。 It's a relatively easy library to understand for someone who is not use to using some of the deeper C# concepts yet. 对于那些还不习惯使用某些更深层的C#概念的人来说,这是一个相对容易理解的库。
最简单的方法是按此处所述编辑注册表HKEY_CLASSES_ROOT\\DesktopBackground\\shell
://www.howtogeek.com/107965/how-to-add-any-application-shortcut-to-windows-explorers-context-menu /
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.