Lazarus
Programming => General => Topic started by: fatmonk on December 03, 2019, 11:58:20 am
-
I believe I've added a second icon to my project for use in a file association by adding an icon type resource under Resources in the Project Options dialog.
I want to assign this icon as a FileAssociation.ExtensionIcon but cannot figure out how to assign it.
I can include the second icon as a separate file alongside the exe, but I was hoping that by including it as a resource I could avoid that and just distribute the exe on its own but still have two (or more) different icons available.
FileAssociation.ExtensionIcon is looking for a string so referencing the resource might not be possible...
-FM
-
OK, I think I might have figured this out...
When you add the multiple icons as resources, it looks like you can access them as follows:
FileAssociation_type1.ExtensionIcon:=Application.ExeName+',0';
FileAssociation_type1.ExtensionIcon:=Application.ExeName+',1';
At least it seems to be working...
-FM
-
Is this only under windows?
Or does this also work with MacOS?
-
I'm only working under Windows and don't have a Mac to try on.
I don't have Windows in my uses declaration, though, so I don;t believe I'm using anything Windows specific in my code.
-FM