0

I found this link from Microsoft on how to implement a Windows taskbar icon for a form which is different from the form's icon. I have one icon that fits to window and another one that fits the taskbar. It worked perfectly the first time I tried but then I had to stop trying it out and go back in code. Now as I am trying to implement it again, it does not work anymore, I have to idea why. Basically it's very easy:

  1. Add a NotifyIcon component to the form
  2. Choose the icon and set visibility

Did anyone experience the same trouble?

IngoB
  • 2,552
  • 1
  • 20
  • 35
  • Possible duplicate: https://stackoverflow.com/questions/16962639/why-isnt-my-notifyicon-showing-up – Loathing Aug 31 '23 at 00:46
  • @Loathing It's something different, my problem is about the form's icon in the windows taskbar. That has nothing really to do with notifications, it's (as far as I know) the only way to have another icon in the taskbar and the upper left corner of the form. – IngoB Aug 31 '23 at 10:37
  • IIRC, the Form's icon in the task bar will be the 48x48 image inside the icon file. An icon file can contain multiple images with different sizes, e.g. 16x16, 24x24, 32x32, 48x48, 64x64, 96x96, 128x128, 256x256. Or more precisely, Windows will pick the closest dimension to what it wants and then scale it to fit. – Loathing Aug 31 '23 at 16:30
  • @Loathing That's what I wanted - thank you so much! I wasn't aware about that. Change it to an answer if you want. – IngoB Sep 01 '23 at 06:53

1 Answers1

0

The Form's icon in the task bar will be the 48x48 image inside the icon file. An icon file can contain multiple images with different sizes, e.g. 16x16, 24x24, 32x32, 48x48, 64x64, 96x96, 128x128, 256x256. Or more precisely, Windows will pick the closest dimension to what it wants and then scale it to fit.

Loathing
  • 5,109
  • 3
  • 24
  • 35