Lazarus

Programming => General => Topic started by: pcurtis on October 29, 2020, 04:28:33 pm

Title: [SOLVED] Taskbar icon.
Post by: pcurtis on October 29, 2020, 04:28:33 pm
Hi All,

How do I define the icon to display in the taskbar Win 10?

I have some {$R *.res} file and the compiled program does not respect the settings in Project Options

Thanks in advance.
Title: Re: Taskbar icon.
Post by: Handoko on October 29, 2020, 05:41:21 pm
I do not use Windows but I believe it should be:

Lazarus main menu > Project > Project Options > left panel: Application > right panel: Appliation settings > Icon
Title: Re: Taskbar icon.
Post by: pcurtis on October 29, 2020, 05:58:38 pm
That's what I thought, but if you include other resources it's not  >:(
Title: Re: Taskbar icon.
Post by: lucamar on October 29, 2020, 06:41:23 pm
That's what I thought, but if you include other resources it's not  >:(

Are you including them also in "Project Options"? Because doing it that way have always worked for me. It doesn't work quite as well if you define them in a .rc file with the same name as the program or a form unit because then the generated .res overwrites the one automatically produced by Lazarus.

Another thing, in case it keeps not working, does the application icon show in the form's border? I've found that sometimes for some strange (to me) reason Windows show the correct icon in the form but "invents" its own for the task-bar. But then, I don't use Windows very much (in fact, once in a blue moon or thereabouts ::))
Title: Re: Taskbar icon.
Post by: wp on October 29, 2020, 07:37:32 pm
That's what I thought, but if you include other resources it's not  >:(
Not for me - see attached demo: I selected the "yellow" cheetah icon from (lazarus)/images/icons as application icon (using "Application settings" > "icon", as mentioned by handoko) and linked a resource .res file (test.res) created by the attached batch file so that it contains the cheetah jpg image of the Lazarus installation (you may have to update the image path if you want to run the batch file yourself).
Title: Re: Taskbar icon.
Post by: pcurtis on October 29, 2020, 07:57:12 pm
I solved it by replacing all ico files with png files
TinyPortal © 2005-2018