How to host explorer context menu in app?

352 views Asked by At

I have been developing an app with SharpShell Context menu handler that adds and removes certain functions to the explorer context menu. I am trying to create an interface so that the user can choose what to add depending on what is currently available but i cannot figure out how to display the native explorer context menu in the UI. The app is written in VB.net but i can translate C#. Any help would be appreciated.

1

There are 1 answers

0
Sunil On

You need to iterate over Windows Registry to get existing items and need to update these registry keys to update the menu item.

Following registry keys are available:

  1. When you right click in blank area a folder: Computer\HKEY_CLASSES_ROOT\Directory\shell

  2. Look for shell folder under your file extension registry to add open with programs.

  3. Look for ContextMenuHandlers

Check this guide on CodeProject.

Check this guide on Microsoft.

C# wrapper is also available