[RESOVED] Thumbnail Images for Files
Is it possible to set the image windows displays when viewing a file created in a VB.NET application?
In my case I have files saved that store info on football plays for a play creator program. Can I use the image of that play as what the user will see when he searches through windows explorer?
Let me further explain with an analogy: photo files in windows have their images displayed as the user cycles through them; he chooses which one he wants to doubleclick based on the thumbnail image of the actual photo. I'd like to have a "photo" of the play itself shown instead of what is now just a blank generic grey icon for the play files that I save.
Does that make sense enough?
Re: Thumbnail Images for Files
I think that that functionality is built into the OS itself for specific file types that it recognises, i.e. MS programmed it to recognise. For instance, Windows 7 uses the first page of a PDF as the icon. I don't think it works that way in Vista for PDFs.
Re: Thumbnail Images for Files
Just FYI, Vista does give the first page as the icon, for PDFs, if you are in Tiles, Medium Icons, Large Icons or Extra Large Icons mode. Just not in List, Details or Small icons.
Re: Thumbnail Images for Files
Thank you both for the info. :)
Re: [RESOVED] Thumbnail Images for Files
Actually, I think you can do some of it. I think what you are looking for are Managed Preview Handlers:
http://msdn.microsoft.com/en-us/magazine/cc163487.aspx
I have never written one myself, but I think it will do what you want.
EDIT: After reading a bit more, it doesn't change the icon, but when you click on a file, it does give you a preview, which may get you closer to what you want.
Re: [RESOVED] Thumbnail Images for Files
This topic intrigued me, so I did a bit more digging. To do exactly what you wanted, you would have to write an Icon Handler shell extension. This is not something you should do in .Net and would require some C++ code to do. If anyone is interested in the future, here is a good link.
http://www.codeproject.com/KB/shell/shellextguide9.aspx
I always wondered how visual studio displayed which version of VS applied to a solution file, I am guessing this is how they did it.