5

I have a file type for my application for which i want to show some custom information in Details Pane(which appears at the bottom) in windows explorer in vista and win 7. Like Microsoft Word file type (.docx) has properties on Details Pane in vista and window 7 that show author property and e.t.c i have some custom information for my file which i want to show. I want it to be a c# .net 2.0 application that does it for me.

Any help is appreciated.

PUG
  • 4,301
  • 13
  • 73
  • 115
  • Look at this link: http://code.msdn.microsoft.com/WindowsAPICodePack – digEmAll Dec 22 '10 at 08:12
  • And this q&a : http://stackoverflow.com/questions/3510002/how-to-use-windows-7-features-in-my-simple-net-application-without-any-new-api – digEmAll Dec 22 '10 at 08:17
  • with windows API Code pack one can enable win taskbar features than i am aware of, are you suggesting using the same code i can add properties in details pane? if yes can you give a hint, thanks – PUG Dec 22 '10 at 08:57
  • this is a tough one, couldnt find the answer anywhere yet – PUG Dec 23 '10 at 05:53
  • No, API code pack will not help with this. – Anton Tykhyy Dec 23 '10 at 13:23

2 Answers2

4

This is a tough one. You need to implement a property handler. A property handler is a COM object which knows how to extract properties from your files. I think it can use out-of-process activation so you may be able to use .NET 2.0, but be prepared for a lot of COM interop stuff. The All-in-one code framework has some examples of shell extension objects written in C++ and in C# for .NET 4, which should at least give you pointers. See also this question.

Community
  • 1
  • 1
Anton Tykhyy
  • 19,370
  • 5
  • 54
  • 56
  • 1
    Also note that this should NOT be done in .NET 2 - you should use C++ or .NET 4. Using .NET 2 can cause major instabilities if another shell addin exists using .NET 1.1, etc, since you can't (prior to CLR 4) load multiple CLR instances into a process. – Reed Copsey Jan 04 '11 at 21:28
  • Right, this is why I mentioned out-of-process activation. – Anton Tykhyy Jan 04 '11 at 22:11
2

Information for what to display in each file type is in the registry under: HKEY_LOCAL_MACHINE\SOFTWARE\Classes\SystemFileAssociations\

You could create a sub key at install time for your file type (by extension), and set the properties you want displayed.

Derick
  • 21
  • 2