Windows shows the wrong icon for my application in the Windows Explorer and
on Short Cuts. When I start the program it shows the correct icon in the
taskbar and at the left-top corner of my application window.
It always was ok, untill today. I have changed the icons, and delete the
.res files. Without succes.
I found article FAQ4438D on the borland site, but I do not understand this
what I have to do.
Please advice,
Andre
Thanks
Andre
"Andre Hoonhout" <an...@cds-nl.com> wrote in message
news:3dde...@newsgroups.borland.com...
>I use Delphi 6.
>
>Windows shows the wrong icon for my application in the Windows Explorer and
>on Short Cuts. When I start the program it shows the correct icon in the
>taskbar and at the left-top corner of my application window.
Windows' icon cache is probably messed up. I force a rebuild using TweakUI
when this happens (free from MS).
JensG
It did not work. I downloaded the TweakUI and restarted my computer.
When I copy the .exe file another computer then I also shows the wrong icon.
Brdgs
Andre
"Michael Warner" <m...@ozemail.com.au> wrote in message
news:ldlstus54kmungcml...@4ax.com...
I am using Windows XP.
I searched for the file anyway, but did not gfind it.
Brdgs
Andre
"Jens Geyer" <j...@vsx.net> wrote in message
news:3dde6bdb$1...@newsgroups.borland.com...
I had this once. Tracked it down to a third-party component for which I did
not have the source. When I removed the component from my app, it was ok,
when I put it the component back in, the wrong behaviour reappeared. The
people supplying the component solved it, but didn't tell me how...
Not a solution, but maybe something for you to investigate.
Marjan
_________________________
Marjan Venema - BJM Software
info(AT)bjmsoftware(DOT)com
http://www.bjmsoftware.com
>> Windows shows the wrong icon for my application in the Windows Explorer and
>> on Short Cuts. When I start the program it shows the correct icon in the
>> taskbar and at the left-top corner of my application window.
>
>I had this once. Tracked it down to a third-party component for which I did
>not have the source. When I removed the component from my app, it was ok,
>when I put it the component back in, the wrong behaviour reappeared. The
>people supplying the component solved it, but didn't tell me how...
Do you have additional icons added to your .exe (in .res files)?
Delphi stores them by alphabetical order and includes the default icon
as MAINICON. If you've added icons with names coming before MAINICON,
they'll be the ones showing up in Explorer (which uses the first icon
by default).
I've solved that problem in one of my apps by prefixing all my icon
names (in the .rc file) with Z.
Some ideas in addition to other replyes.
May be u have one icon for form and OTHER icon for application
(I mean in Project Options Wizard). Check it.
__________________________________________________
If application have 2 resource with same names only first is
allowed (means compiling order). Any other is include into exe
but not show as MAINICON.
Also better way to rebuild iconcashe is simply find and destroy. And then
restart computer
Alex
I remember *I* didn't.
I remember the 3party people did have a MAINICON in their bpl file.
I questioned them as to whether this was the problem and they answered:
> The solution wasn't the removal of the MAINICON resource from the
> package res file though (we remove it just to be sure). It has to
> be some bug in Delphi in handling different version resource
> file. I won't bore you with details, but we think we fixed it.
I was using D5 at the time, all service packs installed that were available in
June 2000.
I have only one icon in my project. I put it in their with Project Options.
I checked the .res file, and their is only one icon called MAINICON. So that
should be correct.
I used other .res files from other projects. I have created my own .res
file. But i never works.
Thanks
Andre
"Guy Gervais" <ggerv...@hotmail.com.no.spam> wrote in message
news:l68vtuc2q9urj2uhm...@4ax.com...
Are there other icons in your EXE? Windows uses the first icon from the exe,
IOW the name of the icon resource has effect on the icon which is used by
windows.
You can verify this using either a resource editor or opening the exe in the
Explorer's "Change icon" dialog box.
JensG
There my be more than one resource file included in your project, e.g. with
the {$R resfile.res}directive. Check the EXE file as I suggested in my other
posting.
JensG
I have create a new project, and added all *.pas files to it and compiled
it, but then even there is a problem with the icon.
Although I work with Delphi 6, it shows the default icon of Delphi 2.
I think there is something wrong with my components or something, because my
other projects do not have this problem. The problem is only that is is a
large project with lots of .pas files, so it very hard to find out which
component is causing the problem.
Thanks
Andre
"Jens Geyer" <j...@vsx.net> wrote in message
news:3de1f054$1...@newsgroups.borland.com...
> There is only one icon in the res file.
Sorry, but this answer does not satisfy my question.
JensG
A Borland vlc file (I think it had an f in it) has an icon in it. I suggest
you remove units one by one until you find the bad one or curse me for
getting it wrong.
--
Brian Slack
http://www.depicus.com
"Wake On Lan" and "Remote Shutdown" Software
"Andre Hoonhout" <an...@cds-nl.com> wrote in message
news:3de2...@newsgroups.borland.com...
>Hi Jens,
>There is only one icon in the res file.
>I have as directive {$R *.RES} and I have only one res file in the project
>directory, which has the same name as the project file.
>
>I have create a new project, and added all *.pas files to it and compiled
>it, but then even there is a problem with the icon.
>
>Although I work with Delphi 6, it shows the default icon of Delphi 2.
>
>I think there is something wrong with my components or something, because my
>other projects do not have this problem. The problem is only that is is a
>large project with lots of .pas files, so it very hard to find out which
>component is causing the problem.
Well here's a ugly hack for your problem. Add the icon you want to
your file using a .res file.
Create a xxx.rc file and put something like this in it:
AAAAA ICON C:\...path...\AppIcon.ico
Compile it with the BRC32 and then add it to your project using a {$R
xxx.res } directive.
That way, you'll have an icon resource named AAAAA that should be the
first one in your .exe.
In all my projects I now simply put my icon in the .res file twice,
once as MAINICON and again with *any* other name. I have had no
problems since!
Just don't ask me to rationalise it - it works for me and I don't have
any more time to nail the cause.
All resources (including icons) once compiled into an exe are stored in
alphabetical order - with named resources before numbered resources. The
Windows OS will always use the first icongroup as the default. Hence if you
add an icon resource with a name alphabetically less than 'MAINICON' (eg
'ANICON'), 'MAINICON' will no longer appear as the default icon.
HTH ...
"Malcolm" <mal...@spam.will.bounce> wrote in message
news:3de3f609$1...@newsgroups.borland.com...
Judging from the number of times this issue gets raised and the
differing solutions offered, I just get a sneaking suspicion there is
something going on that has not been nailed down.
My solution works for me all the time (so far <g>). The others
didn't.
/shrug/