Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Icon shown on exe file in File Explorer

Status
Not open for further replies.

Bryan - Gendev

Programmer
Jan 9, 2011
408
AU
Hi,
I've changed the version of my app and I have the version # incorporated in the icon which shows against the executable in File Explorer. But I can't remember how to specify the icon so that I can use the new one with the new version #.
I've looked in the IDE but can't locate the icon name there.
I'm using Inno installer but obviously it's nothing to do with that

Any help - thanks

GenDev
 
Project information -> Attach Icon/ Icon button to pick the icon, then build the EXE.

Chriss
 
Sadly, that didn't work.. I rebuilt the project before remaking the exe as well.

icon1_pazza0.png
icon2_umigzg.png


GenDev
 
Hi Chriss,

If I look closely using magnify in the browser the number on the icon is 10 not 11.

GenDev
 
F5?

Or did the build even succesd? And do you look at the EXE you just compiled or in another place?

Chriss
 
The exe is indeed the one created directly after the 'build' but I'm not sure how to tell if the build succeeded though?
I've just done another rebuilt with a recompile. I see the recompile activity and the same when I rebuild the exe. But same result.
The old icon file isn't in the folder anymore.
Problem not solved!
Despite the correct icon image being shown in the IDE dialogue - there was an older icon file in the folder without a version in the title but it did have V10 on it. I deleted this file and I thought all is well however my eyes deceived me .
icon3_at5tuk.png

I've been through the whole process again - built a new icon file with 11 in it. Rebuilt - new exe - dang! still the 10 file shows.
I shall leave it for a while and try again later..

Thanks for your comments..


GenDev
 
GenDev,

Are you aware that an ICO file can contain multiple icons, and multiple copies of the same icon at different sizes? In order for an EXE's icon to appear within Windows, you need as a minimum a 16x16 and a 32x32 version of your icon.

Your favourite icon editor will tell you which icons the file contains.

Also, you might need to tell the icon editor which icon you want to have priority.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
AS a test I used my icon editor VariIcons to create a new icon (a very simple one) to the same spec as it indicated for my old icon 32x32.32bpp. This was the only size shown.
I added the new test.ico to my project via project info and it showed there, rebuilt the project and created a new exe.
icon5_nqmw5g.png

And the old icon still showed.
So
1 although the cursor takes say, 10 secs , to return after a rebuild and the pjt file shows the current time ,and
2 the exe shows the new time
The icon hasn't changed,

icon6_bydd92.png


So I wonder if the icon file name is stored somewhere else?

GenDev
 
Further to above.

I've just renamed and rebooted my PC ( to stop some specific actions in my code) and the icon has changed to the test.
icon7_p7qc5t.png

The icon is a single line. More investigations follow.

GenDev
 
Just to clarify my previous post:

The 16 x 16 icon is the one that appears in the Start menu and in folder windows (at least, in Small Icons view). The 32 x 32 version shows up in desktop shortcuts and possibly in Medium Icon and Large Icon view in folder windows. Does that help at all?

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Windopws stores icons for files in a "database" file it has as hidden system file in each folder. But pressing F5 should refresh that.

Yoiu could also always create a shortcut for your EXE, look into the shortcut properties, click chnange Icon (for the shortcut, not the exe) and get listed all icons in the EXE. You there can even pick another exe as the source of other icons, so that change icon dialog is a hack to have a resource viewer for icons in DLLs are EXEs, in first place the EXE the shortcut is based on.

Chriss
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top