Typically, you can implement this in two ways.
Registry keys - you can write keys and values โโunder HKEY_CLASSES_ROOT. If you look at this hive, you will see extensions on your computer. Look at the article for more information on keys and values. Something simple is possible here, for example, the ability to open .myfile types with your application. Here is an example file association
Shell Extensions (written in COM): here you can do more complex things like Handlers. They will be caused by Windows, so you can do things like paint on the menu, or add custom actions when you right-click. There are more than files here, you can even add property sheets and custom hints.
You will find that you do not use .NET to write a shell handler **. This only applies to older versions of .NET. Everything is fine with .NET4.
This article should help you with the context menu handler in .NET4.
** Why was he not recommend:
When you write a shell handler, it is invoked by the host process (usually Windows Explorer), but also by the Dialogs FileOpenDialogs and FolderBrowser. So the problem will arise if you wrote a shell extension in .NET 2.0 and a .NET 1.1 application called the Open File dialog box, and then a .NET 2.0 shell handler, and your .NET 1.1 application that has an earlier version of the CLR and There will be a version conflict.
So, I'm glad I found out that this was somehow fixed in .NET 4 =)
source share