Tags: 16x16, color, contained, corrupted, file, files, form, format, forms, ico, icons, imagelist, imagestream, net, property, repost, reposting, resx, subscription, technet, upi, web

ImageList ImageStream property corrupted in the form's resx file (repost)

On .Net » Web Forms

1,423 words with 0 Comments; publish: Sat, 29 Dec 2007 13:34:00 GMT; (100140.63, « »)

Reposting after getting Technet subscription set up:

I have several 16x16 256 color icons (the only format on these .ico files) contained in an ImageList that is tied to a treeview through the treeview's .ImageList property. I noticed that over time while developing the application that the quality of the icon's appearance degraded over time, turning from more colorful to more grayscale type of coloring. After re-inserting my original icons into the imagelist from the .ico files, I monitored the form.resx file and noticed that when any change is made to the form on the design window, the binary string for the ImageList at <data name="imlTreeView.ImageStream> in the resx file changed in several places. I think the binary string continues to change enough over time that the icons visibly degrade. I found this KB article that outlines a serialization flaw with 32-bit icons in an imagelist: http://support.microsoft.com/kb/814735. This article doesn't mention that framework 2.0 is affected, and even if it still is affected in the 2.0 framework, why does the VS2005 IDE continue to re-serialize the icon information from the imagelist to the .resx file if the imagelist hasn't changed in the Form designer? I never noticed this behavior with VS2003. I do have SP1 for VS2005 installed.

All Comments

Leave a comment...