I'd like to have a shortcut to my application with certain desktop icons... I'm sure you have all seen Notepad++ for instance. When you right-cl开发者_如何学Cick a txt file on your desktop "Edit with Notepad++" menuitem will show. I assume this must be something in the registry... Does anyone know how to do this programmatically in c#?
I believe you're looking for this: http://www.codeproject.com/KB/dotnet/CSShellExtContextMenuHand.aspx
This may be a overkill for what your are looking for, http://blogs.msdn.com/b/codefx/archive/2010/09/14/writing-windows-shell-extension-with-net-framework-4-c-vb-net-part-1.aspx
If you think this is a overkill, you can manipulate the registry in C# like described here How to create a right-click context shell shortcut "edit with Emacs"?
精彩评论