Shell extensions with C#?
-
Hello! How can I write shell extensions with C#? (more specifically: context menu items in explorer) I'm looking for a nice tutorial like Michael Dunn's excellent article for MFC/C++[^], but using C#. I want to do some real shell programming, not just registry hacks[^]... Thanks in advance and best regards
-
Hello! How can I write shell extensions with C#? (more specifically: context menu items in explorer) I'm looking for a nice tutorial like Michael Dunn's excellent article for MFC/C++[^], but using C#. I want to do some real shell programming, not just registry hacks[^]... Thanks in advance and best regards
It depends which parts of the shell you want to extend, icon handlers and overlays are fairly simple while context menu extensions are rather more tricky. It all requires a reasonable amount of com and win32api interop and some fairly defensive programming to prevent errors reaching and crashing the shell if they occur. Some things like property sheets really aren't possible in fully managed code though that may change when the 2.0 CLR is released.