How can I add an item to the right click menu on the desktop

感情迁移 提交于 2019-12-24 04:48:27

问题


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#?

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

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.


回答1:


You should do this in a setup and deployment project. This article shows the steps to add a menu option in the desktop context menu




回答2:


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/



来源:https://stackoverflow.com/questions/27308674/how-can-i-add-an-item-to-the-right-click-menu-on-the-desktop

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!