Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding Taskbar context menu to win7 application

Where can I find documentation about adding a context menu (EDIT: jumplist) to a windows 7 application? You know, when you right click on the application icon on the taskbar. Can I do that using .NET? Or do I need to use native code?

Thank you!

like image 310
astorcas Avatar asked Jul 01 '10 09:07

astorcas


People also ask

How to add any application to Windows Explorer context menu?

With a quick registry tweak, you can add any application to any Windows Explorer context menu. You can even add application shortcuts to your desktop’s context menu and launch your favorite applications just by right-clicking on your desktop.

How do I launch an application from the right click menu?

You can even add application shortcuts to your desktop’s context menu and launch your favorite applications just by right-clicking on your desktop. We’ve previously covered adding an “Open with Notepad” option to any file’s right-click menu in Windows Explorer, but you can do much more than that.

How do I remove apps from the windows 11 context menu?

To remove any apps added to the Windows 11 context menu in this manner, open the Registry Editor and navigate to the same set of keys and delete the keys associated with those apps. Be your company's Microsoft insider by reading these Windows and Office tips, tricks, and cheat sheets.

What is the windows 11 context menu and why did it change?

With the release of Windows 11, Microsoft decided to shorten the length of the standard context menu in Windows Explorer (reached by right-clicking a filename or folder). The idea was to show only the most commonly used potential apps for that specific file type, which sounds good in theory, but it is not always the best solution for power users.


2 Answers

What I believe you are looking for is the Windows® API Code Pack and you want create a Jump List for your application.

What you see in a Jump List depends entirely on the program.Jump Lists don't just show shortcuts

to files. Sometimes they also provide quick access to commands for things like composing new e‑mail messages or playing music.

Example:

using Microsoft.WindowsAPICodePack.Taskbar;
using Microsoft.WindowsAPICodePack.Shell;

JumpList list = JumpList.CreateJumpList();
JumpListCustomCategory category = new JumpListCustomCategory("Links"); 
category.AddJumpListItems(new JumpListLink("http://www.microsoft.com", "Microsoft"));
list.AddCustomCategories(category);
list.Refresh();

NOTE: The above example is untested, but it should just work™.

I do not know how to make it a command that interacts with the active instance, e.g. like iTunes tasks. I suspect they do an inter-process communication to trigger those actions.

HTH,

like image 90
Dennis Avatar answered Sep 30 '22 19:09

Dennis


If you mean the jumplist, you have to do it using WPF (.NET)

EDIT: See here

like image 33
Andre Avatar answered Sep 30 '22 20:09

Andre