File icon

  • Thread starter Thread starter Tony
  • Start date Start date
T

Tony

How do I retrieve the files associated icon from the file system?
I think it's based on it's extension.

Tony
 
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
 
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
 
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

Tony said:
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
 
Back
Top