Icon not refreshing lazarus / 39-Graphics ---------------------------------------------------------------------- winni · 2020-08-12 21:02 Hi! I made an Icon 256x256. Put it into the project via project --> options --> icon Compiled, the icon was shown in the taskbar adn the titlebar - eveything is fine. The icon was not impressive enough so I made some changes. Then again the same way as above. New compiler run - but the new version of the icon is not shown, but everywhere the old version of the icon. ????? I have no idea what or where to refresh. Any ideas or hints?? Winni ---------------------------------------------------------------------- Blaazen · 2020-08-12 21:21 Try Run->Clean Up and Build... ---------------------------------------------------------------------- winni · 2020-08-12 21:38 Thanx Blaazen - I did that already but did not write it. It has no effect. ??? Winni ---------------------------------------------------------------------- trev · 2020-08-12 23:43 @Winni: operating system? ---------------------------------------------------------------------- winni · 2020-08-13 00:16 Hi! Sorry - I was so bothered that I forgot : Lin64 Suse Tumbleweed KDE, fpc 3.04, Lazarus 2.010 The things become more strange. I tried a lot of different things. Inbetween I deleted the Icon and replaced it with the default Icon - the paw. Perfect . Taskbar and Titlebar show the paw. Then I deleted the paw and replaced it with the new version of the icon . Now I get mad: The Taskbar shows the OLD version of the icon . ???? A nice way to bring people in the mental hospital .... Winni PS : The KDE icon cash ??? ---------------------------------------------------------------------- winni · 2020-08-13 00:30 Hi! Thanx everybody! Another KDE bug: Delete the KDE icon cache  and the problem is solved: Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i cd /home/winni/.cache rm icon-cache.kcache  Winni ---------------------------------------------------------------------- lainz · 2020-08-16 17:15 The same happens on Windows sometimes. So it's a cross platform bug. ---------------------------------------------------------------------- trev · 2020-08-16 22:21 Same thing happens under macOS where the solutions are many, but the quickest is to touch (Unix command) the app bundle directory. Finder caches the icons. Not sure it's a bug as such. ---------------------------------------------------------------------- winni · 2020-08-16 22:40 @trev Nice trick. Should work with Unix/Linux. But that could be done by Lazarus. Or do it yourself with fileSetDate. Winni ---------------------------------------------------------------------- lazimiri · 2020-08-25 15:29 Quote from: Leandro on August 16, 2020, 07:15:29 pmThe same happens on Windows sometimes. So it's a cross platform bug. I agree with you. ---------------------------------------------------------------------- winni · 2020-08-25 15:43 Hi! So we need a workaround. I assume that the NewIcon is of the same size as the Form1.Icon: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i varNewIcon: TIcon;R : TRect;......with Form1 do  begin    R := Rect (0,0,Icon.width,Icon.height);    icon.canvas.CopyRect(R,NewIcon.canvas,R);    end;NewIcon.free;.... The NewIcon is shown at once in the taskbar . But the problem must be somewhere in the code for cashing. I don't know where to start searching . Winni ---------------------------------------------------------------------- trev · 2020-08-26 01:17 The icons that Windows uses for programs are saved in an icon cache, so they can be displayed quickly instead of having to slowly load them every time. I would imagine the Windows solution is to rebuild the icon cache. I'm sure I've done that in the long distant past... back when I was using Windows 2000 on a PC. ---------------------------------------------------------------------- winni · 2020-08-28 19:57 Quote from: trev on August 26, 2020, 03:17:44 amThe icons that Windows uses for programs are saved in an icon cache, so they can be displayed quickly instead of having to slowly load them every time. I would imagine the Windows solution is to rebuild the icon cache. I'm sure I've done that in the long distant past... back when I was using Windows 2000 on a PC. Hi! Yes it seems that there is no checking in the different cache files if there could something be deleted. So the cache grows all the time and contains ancient files. As you talk about Win2000 I just remembered that we once had a big problem with the font cache of Win95: The maximum then was 64k and if you installed a new font and had reached the font cache limit the font did not appear. Solution: Delete some unused fonts, delete the font cache and reboot. Perhaps also here is the solution to delete the icon cache. Will be rebuild after the next reboot. Winni ---------------------------------------------------------------------- trev · 2020-08-29 02:57 See this article which deals with the different ways to rebuild the icon cache under Windows 7/8, 8.1 and 10. Yes, they have to be different ---------------------------------------------------------------------- lazimiri · 2020-09-14 05:44 The article is working really well. It helped me with my icons. Thanks!