Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

changing icon in task manager

Posted on 1999-07-06
16
Medium Priority
?
246 Views
Last Modified: 2010-04-06
how do I change the icon of a project that appears in the task manager ? i.e. the icon that appears when user presses ALT+TAB.

even if I change the application icon this won't have any effect on the task manager
0
Comment
Question by:fadyg
[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
  • 6
  • 6
  • 3
  • +1
16 Comments
 
LVL 17

Expert Comment

by:inthe
ID: 1386551
changin the icon under project options has no effect?
0
 
LVL 10

Expert Comment

by:Lischke
ID: 1386552
Are you sure the icon isn't set at runtime anywhere in the code?

Ciao, Mike
0
 

Author Comment

by:fadyg
ID: 1386553
the icon defined in project/options for this application appears good on the top corner of the form and on the task bar itself but when I press ALT+TAB to see what are the tasks currently running  I get delphi icon
0
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!

 
LVL 10

Expert Comment

by:Lischke
ID: 1386554
This is strange. Have you tried running your application whithout Delphi? What happens there?

Ciao,Mike
0
 
LVL 2

Expert Comment

by:CalvinDay
ID: 1386555
I use this:

SendMessage(Application.MainForm.Handle,CM_ICONCHANGED,0,0);

0
 
LVL 17

Expert Comment

by:inthe
ID: 1386556
i dont think thats what he wants...

i think lischke's last comment should be looked into first
0
 
LVL 10

Expert Comment

by:Lischke
ID: 1386557
I second inthe and have another comment. I remember that Win95 (and assume fadyg is using this "system") sometimes messes around its icons for no known reason. There might all icons be affected or only a few.

fadyg, did you encounter such behaviour on your machine?

Ciao, Mike
0
 

Author Comment

by:fadyg
ID: 1386558
first, thanks for all your comments.
Now, this is very weird since only THAT application shows the delphi icon instead of its own icon (all other applications show proper icons in both the task bar and the task manager)

The delphi icon is present even if no IDE present (run directly fom the compiled EXE)

Any more suggestions to try ?
0
 

Author Comment

by:fadyg
ID: 1386559
One more thing,

Lischke is right about Win95:  sometimes it goes wild with icon management.  However this is not the case here.

ciao, Fadyg
0
 
LVL 17

Expert Comment

by:inthe
ID: 1386560
did you compile or build all?
try open the project in delphi ,and after changing the icon click build all then see as thats all i need to do to change the icon.

0
 

Author Comment

by:fadyg
ID: 1386561
tried this, tried creating a new project with same sources, tried compiling on a different machine.  No use...

0
 
LVL 17

Expert Comment

by:inthe
ID: 1386562
hi,
it is explorer that decides which icon to load (well it loads the first icon it finds in the programs resources)and  because the icons are saved alphabetically  all you  should need to do is change the name of the icon before loading it into the project so that it is stored before MAINICON unless mainicon is your correct for your programs icon.
you can look using the delphis image editor (under tools menu) open the projects .res file to see the order of the icons.weather your icon is mainicon or not change the resources so tat your icon comes first .
did all that make sense??  
0
 

Author Comment

by:fadyg
ID: 1386563
Looked in resource file of the project, the MAINICON is the icon I chose for the application (and no other icon in the resource).  Still, in the taskmanager, the Delphi icon appears for the running EXE.
0
 
LVL 17

Expert Comment

by:inthe
ID: 1386564
does this happen to all your delphi projects?

maybe a delphi reinstall is needed,do you have the update packs installed?
if not i would strongly suggest to get them..

have you tried setting the icon at runtime by loading it from a file?
Put a TImage on your form(set to not visible) and load your icon file into it at design time.  Then in the OnShow or oncreate event, do...
 
Application.Icon = Image1.Picture.Icon;
Form1.Icon = Image1.Picture.Icon;

geez im running out of ideas on this ;-)
try the above see how it goes
Regards Barry
0
 

Author Comment

by:fadyg
ID: 1386565
Hi Barry,

Delphi has been re-installed, all update packs are present but this didn't solve it.

The only thing that would work is to re-enforce icon changing at run-time.

And the weirdest part is that this behaviour occurs only on some projects. Could not figure out why...

I am rejecting the answer of CalvinDay (after all his answer didn't solve the problem)..sorry :(  . But I would like Barry to lock the question again (after all his solution was not ideal...but it worked)

thanks to all of you guys.
0
 
LVL 17

Accepted Solution

by:
inthe earned 90 total points
ID: 1386566
ok thanks ,but strange problem though isnt it ...

Regards Barry
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
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

670 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