Board index » delphi » Main App Icon doesn't compile into the exe

Main App Icon doesn't compile into the exe

Hello,
I'm using D6. I specified an Application Main Icon using Project | Options |
Application. But my Icon doesn't get compiled into the exe. While the new
icon appears at the top left corner of the main form and in the apps icon at
the task bar, when I look at the executable file from the Windows Explorer,
it still shows the Borland Delphi icon. If I create a short-cut to the exe
on my Desktop it also shows the Delphi Icon.

I've spent hours on this. Deleted the Res file and re-created etc nothing
works. If I start a new project and use the same icon it works fine but not
on my actual project. So I gather it has someting to do with my current
project. Any ideas anyone ? I've completely exhaused all my options.

Thanks
Gregory

 

Re:Main App Icon doesn't compile into the exe


Quote
Gregory Sebastian wrote:
> Hello,
> I'm using D6. I specified an Application Main Icon using Project |
> Options | Application. But my Icon doesn't get compiled into the exe.
> While the new icon appears at the top left corner of the main form
> and in the apps icon at the task bar, when I look at the executable
> file from the Windows Explorer, it still shows the Borland Delphi
> icon. If I create a short-cut to the exe on my Desktop it also shows
> the Delphi Icon.

> I've spent hours on this. Deleted the Res file and re-created etc
> nothing works. If I start a new project and use the same icon it
> works fine but not on my actual project. So I gather it has someting
> to do with my current project. Any ideas anyone ? I've completely
> exhaused all my options.

Do you have any other .res files you are including in your app that also
contain any icons? Are you manually doing anything to the .res file that
Delphi creates (trying to add other resources  to it)?

--
Wayne Niddery - Logic Fundamentals, Inc. (www.logicfundamentals.com)
"Democracy, without that guarantee of liberty, is merely a method of
selecting tyrants." - Alan Nitikman

Re:Main App Icon doesn't compile into the exe


"Wayne Niddery [TeamB]" <wnidd...@chaff.aci.on.ca> wrote in message
news:3e4c4a5c$1@newsgroups.borland.com...
Quote

> Do you have any other .res files you are including in your app that also
> contain any icons? Are you manually doing anything to the .res file that
> Delphi creates (trying to add other resources  to it)?

> --
> Wayne Niddery - Logic Fundamentals, Inc. (www.logicfundamentals.com)
> "Democracy, without that guarantee of liberty, is merely a method of
> selecting tyrants." - Alan Nitikman

No I didn't do anything manually to the res file and I only have one Res
file. Only when I had this problem, I deleted the Res file and let Delphi
re-create it . I can't think of anything different I'm doing from my other
apps. In my project source there is a compiler directive {$R *.RES} just
like all my other projects. This is an MDI app. I've tried loading the Icon
to the Icon property of the Main parent form as well but it didn't help. The
same icon will work fine on a new MDI app however but not on my actual app.

Thanks
Gregory

Re:Main App Icon doesn't compile into the exe


Quote
Gregory Sebastian wrote:

> No I didn't do anything manually to the res file and I only have one
> Res file. Only when I had this problem, I deleted the Res file and
> let Delphi re-create it . I can't think of anything different I'm
> doing from my other apps. In my project source there is a compiler
> directive {$R *.RES} just like all my other projects. This is an MDI
> app. I've tried loading the Icon to the Icon property of the Main
> parent form as well but it didn't help. The same icon will work fine
> on a new MDI app however but not on my actual app.

Very strange, I'm not able to reproduce this *except* by including another
icon with a name that is alphabetically earlier than MAINICON - Windows
displays the new icon instead of MAINICON even though the app itself
continues to show the correct one.

--
Wayne Niddery - Logic Fundamentals, Inc. (www.logicfundamentals.com)
"Democracy, without that guarantee of liberty, is merely a method of
selecting tyrants." - Alan Nitikman

Re:Main App Icon doesn't compile into the exe


Quote
> Very strange, I'm not able to reproduce this *except* by including another
> icon with a name that is alphabetically earlier than MAINICON - Windows
> displays the new icon instead of MAINICON even though the app itself
> continues to show the correct one.

> --
> Wayne Niddery - Logic Fundamentals, Inc. (www.logicfundamentals.com)
> "Democracy, without that guarantee of liberty, is merely a method of
> selecting tyrants." - Alan Nitikman

Another thing I just realised is that the Icon that gets compiled is not the
D6 app icon but the Delphi 2 default application icon. I have D2, D3, D5 &
D6 installed on my developement machine. I found 2 of these Icon at
...Borland/Delphi 2.0/Images/Default/Default.ico  & Borland/Delphi
3/Images/Default/Default.ico.

Any other suggestions as to how I can resolve this. I still have some
projects on D2 hence I can't take it off.

Thanks
Gregory

Other Threads