Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
General
»
change application icon
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Fast Canvas Library V1.05...
by
Gigatron
[
Today
at 02:34:26 pm]
CudaText editor (written ...
by
andersonscinfo
[
Today
at 01:57:57 pm]
AdvancedHTTPServer: A Go-...
by
CynicRus
[
Today
at 01:19:40 pm]
AVRPascal – free code edi...
by
ackarwow
[
Today
at 10:57:09 am]
Olympic Rings (Interleave...
by
Boleeman
[
Today
at 10:34:01 am]
Unit decfloat
by
cdbc
[
Today
at 09:19:10 am]
RTTIPropertyGrid expand
by
ig
[
Today
at 09:11:09 am]
Embedded qss stylesheets ...
by
zeljko
[
Today
at 09:05:42 am]
Seven Kings (inc)
by
speter
[
Today
at 08:22:44 am]
about lazarus and android
by
zzzzzzz7
[
Today
at 04:06:51 am]
Remove region adjacent to...
by
n7800
[
Today
at 02:33:35 am]
Adjacent rectangles not a...
by
ron.dunn
[
Today
at 01:31:51 am]
Tutorial on creating a co...
by
Roland57
[January 16, 2026, 08:29:55 pm]
Newly revised TlistBox in...
by
wp
[January 16, 2026, 06:23:04 pm]
How to forward a Class in...
by
Hartmut
[January 16, 2026, 05:21:35 pm]
How to low level manage S...
by
Tommi
[January 16, 2026, 04:05:54 pm]
Drag and Drop Files; onDr...
by
msintle
[January 16, 2026, 01:27:54 pm]
AI, NLP and CAI: Text Gen...
by
microxa
[January 16, 2026, 12:13:42 pm]
[Solved] Stacked bars not...
by
wp
[January 16, 2026, 10:57:01 am]
Theoretical question. Laz...
by
Petrus Vorster
[January 16, 2026, 09:49:47 am]
[solved] Printout in Prin...
by
wwerner
[January 16, 2026, 07:25:31 am]
The compiler fails to war...
by
dseligo
[January 16, 2026, 01:41:21 am]
Mapping Images Like Odome...
by
SandyG
[January 15, 2026, 11:57:50 pm]
StrToDateTime problems
by
Aruna
[January 15, 2026, 11:56:02 pm]
unit init, finalize and i...
by
PascalDragon
[January 15, 2026, 09:46:49 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: change application icon (Read 948 times)
Paolo
Hero Member
Posts: 675
change application icon
«
on:
December 21, 2025, 07:11:53 pm »
Hello,
I have successfully converted from Deplhi some app of mine, however the icon is still the delphi one, whatever I try in project option.
any suggestion ?
win-10/laz 4.2.
Thanks
Logged
Paolo
Hero Member
Posts: 675
Re: change application icon
«
Reply #1 on:
December 21, 2025, 07:17:36 pm »
to be more precise : on windows view with small icon i see picture 1 with greater icon greater I see picture 2
Logged
Thaddy
Hero Member
Posts: 18676
Jungle wars. And failing health it seems.
Re: change application icon
«
Reply #2 on:
December 21, 2025, 07:40:36 pm »
delete the res and do a build.
Logged
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.
Paolo
Hero Member
Posts: 675
Re: change application icon
«
Reply #3 on:
December 21, 2025, 07:43:37 pm »
already tried.. nothing.
Logged
Paolo
Hero Member
Posts: 675
Re: change application icon
«
Reply #4 on:
December 21, 2025, 07:47:56 pm »
now the problem is disappeared, maybe a refresh problem of windows ???? (even if for sure I deleted the folder and pressed F5 several times).
Logged
LeP
Jr. Member
Posts: 95
Re: change application icon
«
Reply #5 on:
December 21, 2025, 09:10:29 pm »
The problem is Windows, which caches the icon. For me (and not only in Delphi) the icon sometimes stays the same for hours (and if I move the .exe to a virtual machine, the icon is correct).
Now it doesn't bother me anymore; I know the icon is correct.
Logged
Paolo
Hero Member
Posts: 675
Re: change application icon
«
Reply #6 on:
December 21, 2025, 09:22:34 pm »
Ok, it seems the case.
Logged
creaothceann
Sr. Member
Posts: 250
Re: change application icon
«
Reply #7 on:
December 21, 2025, 09:52:35 pm »
Other file managers may also do their own icon caching, for example Total Commander.
Logged
anse
New Member
Posts: 46
Bugmonkey
Re: change application icon
«
Reply #8 on:
December 22, 2025, 12:35:20 pm »
Windows caches icons in your user profile. You can delete these
%userprofile%\AppData\Local\Microsoft\Windows\Explorer\iconcache_*.db
You will need to reboot afterwards. Even then this is not a 100% solution, there may be file type associations or your theme/icon pack which override the icons.
What a mess.
Logged
Thaddy
Hero Member
Posts: 18676
Jungle wars. And failing health it seems.
Re: change application icon
«
Reply #9 on:
December 22, 2025, 02:05:07 pm »
Simpler (Windows only):
Code: Pascal
[Select]
[+]
[-]
program
refreshiconcache
;
uses
windows
,
shellapi
;
procedure
RefreshIcons
;
begin
// Notify shell that file associations have changed
SHChangeNotify
(
SHCNE_ASSOCCHANGED
,
// Event: associations changed
SHCNF_IDLIST
,
// No path needed
nil
,
nil
)
;
end
;
begin
RefreshIcons
;
end
.
Full program
, handy function...
This forces the shell to reload the icons.
Logged
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.
Zoran
Hero Member
Posts: 1980
Re: change application icon
«
Reply #10 on:
December 23, 2025, 01:07:28 am »
Quote from: Thaddy on December 22, 2025, 02:05:07 pm
Full program
, handy function...
This forces the shell to reload the icons.
Nice and useful, thanks!
Logged
Swan, ZX Spectrum emulator
https://github.com/zoran-vucenovic/swan
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
General
»
change application icon
TinyPortal
© 2005-2018