BUG: Error Message When You Try to Add an Icon to an ImageList Control: Invalid Parameter Used (316652)
The information in this article applies to:
- Microsoft GDI+ 1.0
- Microsoft .NET Framework 1.0
- Microsoft .NET Framework 1.1
This article was previously published under Q316652 SYMPTOMS When you try to create an Image object from a 24-bits-per-pixel (BPP) or 16-BPP icon, you may
receive an error message that is similar to the following:
OutOfMemory Or, when you try to add a 24-BPP or 16-BPP icon to an ImageList control, or when you open an icon in a PictureBox control, you may receive the following error message:
Invalid Parameter Used CAUSE This behavior can occur because the System.Drawing method is based on GDI+. There is a bug in GDI+ that prevents it
from loading certain 24-BPP and 16-BPP icons with no color tables. You may also
experience this problem when you try to populate an ImageList control, because of the control's reliance on GDI+.
RESOLUTION To work around this issue, use a 32-BPP or a 256-BPP icon
instead of a 24-BPP icon. STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section of this article.
Modification Type: | Minor | Last Reviewed: | 4/3/2006 |
---|
Keywords: | kbDSWGDI2003Swept kbbug kbCtrl kberrmsg kbIcon KB316652 |
---|
|