Solved

Multiple ICONS on App

Posted on 2002-03-13
9
241 Views
Last Modified: 2010-04-05
Hi
If you look on Explorer.exe it holds different icons, so if you link it you can choose an Icon of your choice.
Does any of you know how to do it in delphi ?
I've tried modifying the default RES file and adding a new one, but no results.

Bye
Marco
0
Comment
Question by:mgesiot
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6860018
simple add a res-file with additional icons
0
 

Author Comment

by:mgesiot
ID: 6860064
Not really
I tried, both adding more icons to the default RES file or adding a new RES file, but no results.

Ok
I'll try again

Thanks
Marco
0
 
LVL 6

Expert Comment

by:DrDelphi
ID: 6862627
You have to be careful when adding a new resource file that you observe case (at least this has been my experience with NT and 2000). I created a new resource file which included the file MyIcon.ico. The file created was named ikon.RES. When I added the line {$Resource ikon.res}, it doesn't give an error, but it won't find my icon either. Changing the line to read {$Resource ikon.RES} did the trick. Quirky, but true....



Good luck!!
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:SteveWaite
ID: 6863334
Don't modify the app res file. Your app should first have the correct icons, read on..

You can have two icons then add whatever else you need in your res files.

The first icon is the low-res/low-color one, the second is the high-res/hi-color one.

So what I currently do is the following:

Add the first icon to your app in the project/options/icon tab. This compiles the smaller/lower color icon into the res file for the app, is the name of your exe and is left alone. You can add your high color icon in a new res file, i.e. Create the .res using brcc32.exe and add the line:
{$R OtherIcon.res}

.. or better still to just add an .rc file to your project which adds the line
{$R 'OtherIcon.res' 'OtherIcon.rc'}
to the application unit.

In the .rc file put the text:
ICON1 ICON  "OtherIcon.ico"

If you delete the res it will be recompiled when you run your app.

Then you get the larger one in the desktop shortcut and the smaller one in the taskbar.

I had a question going about this earlier but got no response. Basically asking if more icons can be added to be automatically selected, it seems not.

if you want more icons to select from then simply add more lines to the .rc file (and make the icons!), be
careful to have different id.'s i.e.

ICON2 ICON  "OtherIcon2.ico"
ICON3 ICON  "OtherIcon3.ico"

etc.

Regards,
Steve

0
 
LVL 3

Expert Comment

by:SteveWaite
ID: 6863345
to add the .rc to your project use project menu/add to project.
the res line is the automatically added to your application unit so do not add {$R OtherIcon.res} anywhere yourself.
0
 
LVL 9

Expert Comment

by:ginsonic
ID: 6863642
listening
0
 

Expert Comment

by:CleanupPing
ID: 9343276
mgesiot:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 7

Expert Comment

by:knightmad
ID: 9470741
Wow, Its been a long time since this comment have been visited!

mgesiot,
No comment has been added lately (19 days), so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:

RECOMMENDATION: PAQ/No Refund

-- Please DO NOT accept this comment as an answer ! --

Thanks,

knightmad
EE Cleanup Volunteer

Remember you (all) can object this recommendation if you disagree, just leave a post here explaining why are you objecting and what should be done instead.
Within 7 days probably this thread will be closed, so, hurry up! : )
0
 

Accepted Solution

by:
YensidMod earned 0 total points
ID: 9536786
This question is PAQed and no points refunded (of 100)

YensidMod
Community Support Moderator
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses
Course of the Month10 days, 15 hours left to enroll

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question