views:

27

answers:

2

Hello, I have a windows application(C#) that has the icon and manifest settings set in the project properties. The icon is set correctly. The problem I am having is when a user launches the application from his/her machine, and logs in, the icon is displayed correctly on the form window, but the icon that is displayed in the task bar is that of the last used application - so if I open MS word and close it, then launch my application, the icon for word is displayed for my application in the taskbar, even though the name is correct.

edit - after the user goes to the second screen, the correct icon shows up in the taskbar

I previously has this issue with 64 bit machines - the icon had 16X16 4 bit bmp and 32X32 4 bit bmp images. I created a new image 64X64, 4 bit bmp file, so the icon had 3 images, and that solved the problem with 64 bit machines.

However, the problem has come back again with Windows 2008 server- R1 -32 bit machine. Does anybody have any clue how to solve this? I am not talking about notify icons here, but the icon that shows up right next to the application name in the taskbar. Thanks. IconQ

+1  A: 

Hard to see how your icon could mess this up. It sounds like a corrupted icon cache. The linked article is quite outdated, ask more about this at superuser.com.

Hans Passant
That seems to have fixed the issue in windows 7, trying it out in 2008 on users machines.
IconQ
it didnt fix it in windows 2008 server which is what the clients are using. I deleted the icon cache, and rebooted, a new icon cache was created, but i see the same issue.
IconQ
A: 

As Hans said, it could be a corrupt icon cache, though you're damn unlucky if you are getting this same problem on more than one machine with different OSes.

It's possible you have a corrupt icon file - The only way I would expect adding of a 64x64 image to have helped is if it simply meant the file was rewritten/regenerated by your editor. A good editor may help (e.g. Visual Studio has always had a truly dreadful icon designer, so if you're using that it certainly won't be helping - although it's only usually if you go beyond 4bpp that VS goes for the epic fail). Try IcoFX, it's free, really good, and will produce reliable icon files regardless of the content you ask it to add. It's also very good at scaling images to quickly generate a full complement of sizes and resolutions.

In general I'd go for better quality icons than 16-colours, and supply plenty of variants for the OS to pick from (at least 16, 32, 64 pixels square at 8bpp & 24bpp). I can't remember which century I last used a 16 colour icon in, but it certainly wasn't this one :-)

Jason Williams
Your comments make a lot of sense. I had the issue in a Windows 7 server as well as in xp, and windows server 2008. I rebuilt the icon cache in windows 7 and that fixed the issue there. Trying the same for the 2008 server.
IconQ
ok, rebuilding the icon cache does not fix the problem in windows server 2008. Any other ideas? The icon still has only those 3 images, maybe if I create a number of additional variant images from which to pick from, it will solve the issue?
IconQ
Jason Williams