Is it possible to extract the associated icon from a file extension?
I found many examples, but they all need a link to a file (path). I want to be able to transfer only the extension, for example "pdf" or ".pdf", and then get the associated icon from it (small, medium, large, external and large).
Additional Information
I have some data in a database that contains information about a file. The file name and extension are the ones I need for this problem.
In my user interface, I want to show a list of all the files that are in my database. I want to show this with the file name + type file.
In my user interface, I also have a zoom device, so I can make the icons bigger or smaller, as you see in Windows Explorer (medium icons, Large icons, etc.). To do this, I would like to get a related icon that my OS uses to show the file in Windows Explorer. This icon that I can use in my list.
I found solutions where I can get the associated icon, but all of them must have a file path to retrieve the icon. For example: using SHFILEINFO to get file icons
I want to be able to pass the extension instead of the file path.
c #
Kaizer
source share