[SOLVED] Extracting icon of associated program
Posted
#1
(In Topic #1332)
Trainee
How can my program find the icon associated with a specific mime-type?
TIA
Posted
Guru

This will get the image from either a file name or from a mime type.
So you could use either…
hImage = GetMimeIcon("/path/to/the/file.html")
or
hImage = GetMimeIcon("text/html")
Code (gambas)
- hMime = DesktopMime.FromFile(TypeOrFile)
- hMime = = DesktopMime[TypeOrFile]
- Return hImage
Or try Desktop.GetFileIcon /comp/gb.desktop/desktop/getfileicon - Gambas Documentation
component gb.desktop must be added to project in project properties
Posted
Trainee
Posted
Guru

1 guest and 0 members have just viewed this.



