Article ID: 316652 - Last Review: February 22, 2007 - Revision: 4.4 BUG: Error Message When You Try to Add an Icon to an ImageList Control: Invalid Parameter UsedThis article was previously published under Q316652 On This PageSYMPTOMS 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 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. MORE INFORMATIONSteps to Reproduce the Problem
| Article Translations
|

Back to the top
