Lazarus
Using the Lazarus IDE => Editor => Topic started by: johnmc on September 15, 2022, 03:35:26 pm
-
Hi,
I using Lazarus 2.2.2 (rev lazarus_2_2_2) FPC 3.2.2 x86_64-win64-win32/win64.
I have created an Icon for my application using Inkscape and exported the file to 128x128 pixel png file.
I can get the icon applied to the exe file, using the project options, but when I create a shortcut to the application and place it on the desktop the icon reverts to the paw. If I create the shortcut by right mouse on the exe file and create shortcut that file has the new icon but move that file to the desktop or use send to desktop and the icon reverts to the paw.
Selecting the shortcut and display the properties show the asocsiated icon to be the new one and selecting change icon also shows the new icon.
Any pointers would be a help.
John
-
Have you looked in correct folder?
I do have sometime the problem that Lazarus compile into \lib\ folder and sometime in root folder of project.
Maybe in your root is a old compiled .exe ?
-
Create 256x256, 48x48, 32x32, 16x16 icon sizes. You can use Greenfish Icon Editor that's made with Lazarus to create the .ico file.
Also Windows has the cached icopn of the exe applications, so maybe is loading the paw icon from the cache.
-
Hi!
Assign the Icon also to the property Icon of the main form.
Winni
-
Assign the Icon also to the property Icon of the main form.
Hello Winni, can you explain a little what a forms icon has to do with the Shell Icon that the OS display?
-
hi!
Have a look of this property of the form:
ShowInTaskbar = stNever | stAllways | stDefault
OK?
Winni
-
MainForm Icon will, if at all, displayed when you run an application.
Shell Icon will be loaded from OS within Resource Section of Executable ("MainIcon") and has absolute nothing to do with Forms, at least that's how it works on Windows.
I apology if my statement does not match for other OS.
-
MainForm Icon will, if at all, displayed when you run an application.
Shell Icon will be loaded from OS within Resource Section of Executable ("MainIcon") and has absolute nothing to do with Forms, at least that's how it works on Windows.
I apology if my statement does not match for other OS.
Hi!
Windows exe-files have an icon by default.
Linux executables don't have that.
It was a hard road to implement that in Linux.
I think it was around Lazarus version 1.0
Try to find some ancient discussion.
Winni
-
Windows exe-files have an icon by default.
Hello Winni, sorry if i sound like i want to fight, that is not my intention, but i do full disagree to above statement.
When you do not include either by project options or with a selfmade ".res", thats a compiled resource file that be linked into .exe resource section, a "MainIcon"-Entry, than Windows will take its default Icon for executable files.
For Graphical applications Lazarus add its blue-looking fist symbol, yes, but that does not mean that it is a must to use it O:-)
I added the 3 different windows icons that are not included in .exe, they come from a shell resource dll.
-
And thank you Winni for updating me about how Linux works with Icon/Symbol/Glyph however it is called there :-*
-
Hi!
Assign the Icon also to the property Icon of the main form.
Winni
I have done this and no difference, and
hi!
Have a look of this property of the form:
ShowInTaskbar = stNever | stAllways | stDefault
OK?
Winni
I tried changing this from stDefault to stAlways but again no difference.
I have also tried clearing the cache. All to no avail.