Home All Groups Group Topic Archive Search About

Icon.ToBitmap() bug for .net 2.0

Author
1 Mar 2006 10:36 PM
BUGREPORT
I get an AccessViolationException running the following code:


namespace DotNetIconBug
{
    public class DotNetIconBug
    {
        static void Main()
        {
            //bug for icon with width > height && color < 32bit on winxp sp2
with .net 2.0
            //here: 12x7.ico a icon (width = 12, height = 7, color: 24 bit)
            System.Drawing.Icon icon = new System.Drawing.Icon("12x7.ico");
            icon.ToBitmap();    //-->AccessViolationException
        }
    }
}

Any Ideas???

AddThis Social Bookmark Button