BLOG.CSHARPHELPER.COM: Make an application show appropriate icons on its forms, Task Manager, Windows Explorer, and other places in C#
Make an application show appropriate icons on its forms, Task Manager, Windows Explorer, and other places in C#
Setting a form's icon is easy. Simply select the form in the Form Editor, select the Icon property, click the ellipsis to the right, and select the icon file you want to use.
Windows uses this icon in many different ways. For example, it displays a small icon in the form's upper left corner and on the taskbar. When you press Alt-Tab, it displays a larger icon in the Task Manager. Windows Explorer also displays an icon for the executable program.
To get the best result in all cases, the icon file should contain several different icon formats. For example, give it a 32x32 24-bit image for use by Task Manager and a 16x16 24-bit version for use by the form's corner and the taskbar. Now the system can pick the most appropriate version when it needs it.
To make Windows Explorer show an icon for the executable image, open the Project menu and select Properties. On the Application tab, below the "Icon and manifest" option button, select the icon file that you want to use in the Icon box.
Note that the results aren't always perfect. If Windows wants a size that it can't find, it resizes an existing image to fit. I haven't figured out yet how to make an icon file that gives high-quality results when you display all of the views in Windows Explorer.
3/30/2011 8:04 AMRichard Moss wrote:
If you want something for all views you need to add 256x256, 128x128, 64x64 and 48x48. I use Axialis IconWorkshop which is a pretty decent editor, but if you want something free there's IconFX. But you need to be a pretty good artist (I'm not!) to create a decent graphic at those sort of sizes. Reply to this
3/31/2011 6:36 AMRod Stephens wrote:
Even when I add all of the possible image sizes, it still seems to pixellate for the Medium Icon and Tiles displays. The other sizes all look fine (aside from the mediocre quality of the images I drew ;-) Reply to this
If you want something for all views you need to add 256x256, 128x128, 64x64 and 48x48. I use Axialis IconWorkshop which is a pretty decent editor, but if you want something free there's IconFX. But you need to be a pretty good artist (I'm not!) to create a decent graphic at those sort of sizes.
Reply to this
Even when I add all of the possible image sizes, it still seems to pixellate for the Medium Icon and Tiles displays. The other sizes all look fine (aside from the mediocre quality of the images I drew ;-)
Reply to this