?
Solved

Multiple ICONS on App

Posted on 2002-03-13
9
Medium Priority
?
247 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

718 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