Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Icons in WinForms

I created an icon with two different image sizes in it:

  • one 16x16 with 24bpp
  • one 32x32 with 24bpp

using the icon editor in Visual Studio.

I had hoped that when used by a form (the Form's Icon-propery) I would see the 16x16 version in its upper left corner and the 32x32 version on the task bar. Unfortunately, the 16x16 version is used in the task bar as well.

So my question is simply: how can I persuade Windows to make a "better" choice between the differnt sizes in my icon file?

like image 358
Zoon Shine Avatar asked Apr 06 '12 07:04

Zoon Shine


People also ask

How do I add icons to Windows form?

You can change the icon in Visual Studio by opening the properties window for the form. You can then upload a new icon image to the icon field. You may also want to add other UI elements or images to your app.

Is WinForms outdated?

As we mentioned above, WinForms is still available but the status of “maintenance mode” likely means it has no long term future. As time passed by, especially in the last 5-10 years, new tools continued to mature and rise in popularity, and each one of them offered many powerful features.

What are icons in Windows?

Windows uses icons to graphically represent items, such as programs and folders. This is part of Windows GUI, or graphical user interface. Icons appear everywhere throughout Windows, and are really just pictures that depict the type of items they represent. The Windows desktop contains a range of desktop icons.

How do I display an image in WinForms?

Open the Visual Designer of the form containing the control to change. Select the control. In the Properties pane, select the Image or BackgroundImage property of the control. Select the ellipsis ( ) to display the Select Resource dialog box and then select the image you want to display.


1 Answers

Import the different sized images into Gimp as layers. Make sure the larger icon is the top layer. Then you can export as .ICO and Gimp will make one file containing multiple icons.

like image 98
Benjamin Smith Avatar answered Oct 01 '22 17:10

Benjamin Smith