PB5.30 Do not use icon...

Windows specific forum
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

PB5.30 Do not use icon...

Post by IdeasVacuum »

PB5.30 x86

Compiler Options, Use Icon.

Works fine, icon is displayed on Window Toolbar and in Taskbar.

However, if the option is un-checked (and the icon name removed), the icon is still used!

On returning to Compiler options, the option is not checked but the icon name has been re-instated.

Can anyone reproduce this issue?
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: PB5.30 Do not use icon...

Post by PB »

> Can anyone reproduce this issue?

No. If I untick the option, then save the source, and create an exe,
then the exe no longer has the icon, as expected.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: PB5.30 Do not use icon...

Post by ts-soft »

Delete IconCache :wink:
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: PB5.30 Do not use icon...

Post by IdeasVacuum »

.....the only thing that works here is to make the change, save the source file, exit PB. I have never needed to not use a previously selected icon so I can't say this is PB5.30 specific. I can say it's not important though. :)
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: PB5.30 Do not use icon...

Post by davido »

@IdeasVacuum,

I experienced similar problems with earlier versions.
I decided to change the icon. Having done so the original icon always appeared!
I shut-down PureBasic IDE, removed all copies of the original icon. Then the new icon was recognised.
Might not be that important but it is a pain.
DE AA EB
User avatar
BasicallyPure
Enthusiast
Enthusiast
Posts: 539
Joined: Thu Mar 24, 2011 12:40 am
Location: Iowa, USA

Re: PB5.30 Do not use icon...

Post by BasicallyPure »

Are you by any chance creating the .exe on the desktop?
If so then the problem is not with PB but it is windows that causes the icon to become stuck.
If this is the case I can tell you how to get the icon unstuck from the desktop.
I have had this problem before so I made some careful notes on how to fix it.

Another experiment you can do is to create the .exe with a different name and see what happens.

BP
BasicallyPure
Until you know everything you know nothing, all you have is what you believe.
Fred
Administrator
Administrator
Posts: 18361
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: PB5.30 Do not use icon...

Post by Fred »

If the icon is correctly sets in the .exe, it can't be PB fault if it's not refreshed.
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: PB5.30 Do not use icon...

Post by IdeasVacuum »

Hi BasicallyPure. Nope, I never create the exe on the desktop, every project has it's own folder. It's not about the exe though if you re-read my description, it's the IDE.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
BasicallyPure
Enthusiast
Enthusiast
Posts: 539
Joined: Thu Mar 24, 2011 12:40 am
Location: Iowa, USA

Re: PB5.30 Do not use icon...

Post by BasicallyPure »

Using Win 7 (x64) and PB 5.30 (X86)
My results are the same as stated by PB above.

It remains unchecked and grayed out.
I can verify that if I delete the icon name then uncheck the use icon box
the next time I open compiler options the name has returned but the box remains
unchecked and grayed out.

The .exe is created without an icon as expected.

BP
Last edited by BasicallyPure on Sun Aug 17, 2014 9:52 pm, edited 2 times in total.
BasicallyPure
Until you know everything you know nothing, all you have is what you believe.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: PB5.30 Do not use icon...

Post by ts-soft »

The icon is not used but is visible in explorer, so you should repair or delete the iconcache!

Is not a joke, is a windows-problem.
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
BasicallyPure
Enthusiast
Enthusiast
Posts: 539
Joined: Thu Mar 24, 2011 12:40 am
Location: Iowa, USA

Re: PB5.30 Do not use icon...

Post by BasicallyPure »

Here are my notes on how I fixed my stuck icon problem on my desktop.
I don't know if it will help or not but is sounds like it could.

BP

Code: Select all

Problem:
	You assign an icon to your program then build the executable directly on the desktop.  Later you assign a different icon to your program and rebuild the executable to the desktop.
You will discover that the icon has not changed from the original.
You can build the executable on the desktop using a different name and the icon will be the latest one but anytime you use the original name you will get the original icon.
You can build the executable in another folder and the icon will be the correct one. If you then try to copy or move the executable to the desktop the icon will change back to the original.

The fix:
	Open a file browser and navigate to;
C:\Users\User\AppData\Local\IconCache.db

Delete the file IconCache.db  If you don't see the IconCache.db file don't worry, just proceed to the next step.

Open the windows task manager, (ctrl + alt + del). select 'start task manager".  Click on the process tab and locate the process 'explorer.exe'.
Select 'explorer.exe' then click 'End the process'.

Now while still using the task manager click on 'file' from the menu.
From the menu choose 'New task (Run)'.
Type in 'explorer.exe' then click OK.

The icon on your desktop executable will update to the latest.

Deleting the IconCache.db file by itself will not solve the problem.
It will be rebuilt from memory by explorer.  You must do the steps as descried with task manager to complete the fix. 

Don't worry that the IconCache.db file is gone, it will be rebuilt the next time you start windows.

BasicallyPure
Until you know everything you know nothing, all you have is what you believe.
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: PB5.30 Do not use icon...

Post by davido »

@BasicallyPure,


Thank you for the explanation. :D
DE AA EB
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: PB5.30 Do not use icon...

Post by IdeasVacuum »

Thanks BP, very through instructions! 8)
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Post Reply