Problem in changing the custom icon for a Windows form...

Hi,

I am trying to change the form icon of a C# windows application.I am using the Visual Studio .NET 2003 IDE. I have modified the icon using the icon editor available in Visual Studio .NET IDE. After saving my changes, when I try to update the Icon property of the main form , the icon image appears correctly in the Properties window but the icon image in the upper left corner of the form does not get updated.

I did a google search and found an article at the following link:

http://www.kbalertz.com/kb_914349.aspx

According to the article, this is an issue in the C# .NET 2003 edition. I would like to know if there is any official article available on this in the MSDN library. It would be very helpful if developers who have already faced this problem and know the solution share their knowledge with me.

Thanks...



Answer this question

Problem in changing the custom icon for a Windows form...

  • Sébastien Nunes

    Given the KB you mentioned it is an issue with 2005 and some previous versions. Nevertheless the KB tells the solution to the problem. The problem is that you are editing the 32x32 version of the icon. Icon files contain 1o r more icon images of varies size and color depth. The icon shown in the caption of a window is the 16x16 version. By default a new icon file will have a 32x32 icon and perhaps a 16x16. You need to switch to the 16x16 version and create your icon image there as well. If you open the icon in the editor and then right-click you will see an option for image types. You can select the 16x16 size icon from there to edit it. If it doesn't appear then an option is on the context menu to add a new image type and you'll add the 16x16 and then edit it.

    Michael Taylor - 9/7/06


  • Problem in changing the custom icon for a Windows form...