Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Multiple ICONS on App

Posted on 2002-03-13
9
Medium Priority
?
252 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
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

782 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