Hi Tony,
I am not sure of this but a quick look at registry gave me this.
Associated class id of each extension can be found under
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\<extension>\OpenWithProgids
check for the corresponding class id under HKEY_CLASSES_ROOT. You can find
the default icon and under the "shell" key you can find the associated
executable for view/edit.
HTH
Rakesh
> How do I retrieve the files associated icon from the file system?
> I think it's based on it's extension.
>
> Tony
>How do I retrieve the files associated icon from the file system?
>I think it's based on it's extension.
HOW TO: Use the SHGetFileInfo Function to Get the Icons That Are
Associated with Files in Visual C# .NET
http://support.microsoft.com/?kbid=319350
Mattias

Signature
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Tony - 06 Dec 2004 21:15 GMT
Is there a way to get the ICON if I just pass a file extension - since my
files are stored in the database at the time I want to display the icon?
Tony
>>How do I retrieve the files associated icon from the file system?
>>I think it's based on it's extension.
[quoted text clipped - 4 lines]
>
> Mattias
Tony - 06 Dec 2004 21:25 GMT
nevermind, I didn't research enough before I asked. I found that the same
method can do it with just the extension.
Thanks a lot,
Tony
> Is there a way to get the ICON if I just pass a file extension - since my
> files are stored in the database at the time I want to display the icon?
[quoted text clipped - 9 lines]
>>
>> Mattias