How can I set two different icons on the same form in Visual Studio?

Viewed 126

I want to use two different icons for my Visual Studio program, one for the left side on the window and another for the taskbar. Is there any way to do it? Thank you.

edit: I mean I want to have two different icons, one for the window and another for the taskbar, as you can see in the imagesm because when you upload an icon it automatically puts the same icon for both of the situations mentioned in the images.

Window icon

Taskbar icon

1 Answers

@ Samuel.

The .ico file can contain multiple images. When you load the .ico file, Windows selects the most suitable image according to the current display mode and system settings to load one of the images.

You could create a multi-size icon with the different image and set the size to 64x64, 32x32, 16x16 respectively. In this way, you can include different images in one icon. Then set the Icon property of the form: select the prepared icon and click open.

enter image description here

When you run, you will get the effect in the picture below.

enter image description here

Related