Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Shortcut Icon Not Appearing

I am trying to get a shortcut icon to show in a VS Installer application, but am having no luck. I'm not quite sure what I am doing wrong.

I have a Tray app that starts a service. When I run in debug, the Tray has the correct icon. I have set the Tray's exe icon to the correct icon.

In the installer, I have added shortcuts to the desktop and user's program menu. For both shortcuts, I have tried setting the icon to the actual icon (which I added to the application folder for this reason) and the exe output, but neither works.

After installing, The Tray app still shows the correct icon, but when I open Settings, it displays the correct icon on the UI window but a generic icon on the Start Bar. (In debug mode, the Start Bar shows the correct icon). The shortcuts also show a generic icon.

I am using an ico file with a single 256 x 256 image. Anybody have any ideas what I might be doing wrong?

enter image description here

One thing that I noticed was that the image in the Current icon window looks pixelated (see image above). Could this mean that i am not using a valid size icon (256 x 256)?

like image 240
Tim Avatar asked Jun 12 '13 18:06

Tim


1 Answers

After quite a bit of experimentation, i determined that the issue did, in fact, have to do with the size. I created several different sized images packed in the icon, and then tried installing, and the shortcut displayed the correct icon.

For those of you who run into this same issue, I used the free Greenfish Icon Editor Pro, selecting Icon -> Create Windows icon from image. I kept the default size and colors, which created the following sized icons in 16 colors, 256 colors, and 32-bit color: 16x16, 32x32, 48x48. I also kept my 256x256 in 32-bit color.

I replaced my old icon with this new one, and everything worked perfectly.

like image 101
Tim Avatar answered Sep 19 '22 05:09

Tim