Icons
-
I have a database in which users can upload files for storage and whatnot. In my windows forms app to download/upload I am displaying the files that the user has uploaded. In the ListView I would like to display the appropriate icon for each file. ex: If they have Microsoft Word installed, it should display a Microsoft Word icon. If not just a plain file icon should be displayed. How would I do this? Any help is appreciated.
-
I have a database in which users can upload files for storage and whatnot. In my windows forms app to download/upload I am displaying the files that the user has uploaded. In the ListView I would like to display the appropriate icon for each file. ex: If they have Microsoft Word installed, it should display a Microsoft Word icon. If not just a plain file icon should be displayed. How would I do this? Any help is appreciated.
Perhaps you could call
SHGetFileInfo
to obtain the file's icon index in the system image list (as well as its display name, eg: "Microsoft Word document"). You can pass a fictitious filename (with a matching extension) toSHGetFileInfo
. See this[^] link for how to callShGetFileInfo
from your WinForms app. /ravi My new year's resolution: 2048 x 1536 Home | Music | Articles | Freeware | Trips ravib(at)ravib(dot)com -
Perhaps you could call
SHGetFileInfo
to obtain the file's icon index in the system image list (as well as its display name, eg: "Microsoft Word document"). You can pass a fictitious filename (with a matching extension) toSHGetFileInfo
. See this[^] link for how to callShGetFileInfo
from your WinForms app. /ravi My new year's resolution: 2048 x 1536 Home | Music | Articles | Freeware | Trips ravib(at)ravib(dot)com