No shortcut icon displayed

I am trying to get a shortcut that will be displayed in VS Installer application, but I'm out of luck. I'm not quite sure what I'm doing wrong.

I have a Tray application that starts a service. When I start debugging, the tray has the correct icon. I set the Tray exe icon to the correct icon.

In the installer, I added shortcuts to the desktop menu and user program. For both shortcuts, I tried to set the icon to the actual icon (which I added to the application folder for this reason) and exe output, but it does not work.

After installation, the Tray application still shows the correct icon, but when I open Settings, it displays the correct icon in the user interface window, but the general icon on the launch bar. (In debug mode, the launcher displays the correct icon). Shortcuts also display a common icon.

I am using an ico file with one 256 x 256 image. Anyone have any ideas what I can do wrong?

enter image description here

One thing I noticed is that the image in the Current Icon window looks jagged (see image above). Could this mean that I am not using an icon of acceptable size (256 x 256)?

+4
source share
1 answer

After quite a bit of experimentation, I decided that the problem was really related to size. I created several images of different sizes packaged in an icon, and then tried to install, and the shortcut displayed the correct icon.

For those of you who have encountered this problem, I used the free Greenfish Icon Pro icon editor by selecting Icon β†’ Create Windows from the image. I saved the default size and colors, which created icons of the following sizes in 16 colors, 256 colors and 32-bit color: 16x16, 32x32, 48x48. I also saved 256x256 in 32-bit color.

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

+6
source

Source: https://habr.com/ru/post/1485862/


All Articles