Recent

Author Topic: [SOLVED] Taskbar icon.  (Read 1287 times)

pcurtis

  • Hero Member
  • *****
  • Posts: 951
[SOLVED] Taskbar icon.
« 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.
« Last Edit: October 29, 2020, 07:59:42 pm by pcurtis »
Windows 10 20H2
Laz 2.2.0
FPC 3.2.2

Handoko

  • Hero Member
  • *****
  • Posts: 5131
  • My goal: build my own game engine using Lazarus
Re: Taskbar icon.
« Reply #1 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

pcurtis

  • Hero Member
  • *****
  • Posts: 951
Re: Taskbar icon.
« Reply #2 on: October 29, 2020, 05:58:38 pm »
That's what I thought, but if you include other resources it's not  >:(
Windows 10 20H2
Laz 2.2.0
FPC 3.2.2

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Taskbar icon.
« Reply #3 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 ::))
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

wp

  • Hero Member
  • *****
  • Posts: 11858
Re: Taskbar icon.
« Reply #4 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).

pcurtis

  • Hero Member
  • *****
  • Posts: 951
Re: Taskbar icon.
« Reply #5 on: October 29, 2020, 07:57:12 pm »
I solved it by replacing all ico files with png files
Windows 10 20H2
Laz 2.2.0
FPC 3.2.2

 

TinyPortal © 2005-2018