简体   繁体   English

如何在桌面上的右键菜单中添加项目

[英]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#概念的人来说,这是一个相对容易理解的库。

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 本文介绍了在桌面上下文菜单中添加菜单选项的步骤

最简单的方法是按此处所述编辑注册表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.

相关问题 如何在Windows XP的桌面右键菜单中添加项目 - How can i add an item in the desktop right click menu in Windows XP 如果未在列表视图中选择任何项目,如何禁用右键单击菜单 - How can i disable right click menu if there is no item selected in listview 如何在MS Project的右键菜单中添加菜单项? - How to add menu item to right click menu in MS Project? 仅在桌面中添加右键单击上下文菜单 - Add right-click context menu only in desktop 将新项目添加到 Windows 上下文菜单(右键菜单) - Add new item into Windows context menu (right click menu) 如何在UWP中更改RichTextBlock的右键单击菜单 - How can I change the Right-Click menu of a RichTextBlock in UWP 如何在DataGridView上使用右键单击上下文菜单? - How can I use a right click context menu on a DataGridView? 当用户选择文本时,将自定义项目添加到右键菜单 - Add custom item to right click menu when user selects text 我如何在C#WPF中在ListView中添加ContextMenu(想在某人确实单击ListView项目时添加“修改”操作) - How i can add ContextMenu in ListView (want to add “Modify” operation when someone do right click on ListView item ) in C# WPF 右键单击菜单项时如何显示上下文菜单 - How to show a Context Menu when you right click a Menu Item
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM