How to insert my application to Windows right click menu?

I would like to write a C# .NET program that will do some transformations to selected images. After I select several images on my desktop (or any other windows folder) and right click them, I would like to see my program in the appeared menu. How can I insert my program to this menu, and execute it when this option is clicked ? I would appreciate a little code example.

Thanks in advance !


The easiest way to do this is not through code but through registry entries. Add a key under HKCR / filetype / Shell (where filetype is the filetype associated with the file extension, e.g. jpegfile). The name of the key is your menu option (e.g. "Transform"). Under this create a key named Command, and set the value of this key to the command line for your program e.g. c:\myprogram\myprogram.exe "%1" (the %1 is where Explorer will substitute the file name of the right-clicked file).

Need Your Help

C# Convert Func<T1, object> to Func<T1, T2>

c# generics lambda

I have no doubt this is as easy to do as possible, but I have a function creator library that creates lambda functions for me of the form:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.