ImageList::ImageCollection::Add Method (Image^, Color)
.NET Framework (current version)
Adds the specified image to the ImageList, using the specified color to generate the mask.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Parameters
- value
-
Type:
System.Drawing::Image^
A Bitmap of the image to add to the list.
- transparentColor
-
Type:
System.Drawing::Color
The Color to mask this image.
Return Value
Type: System::Int32The index of the newly added image, or -1 if the image cannot be added.
| Exception | Condition |
|---|---|
| ArgumentNullException | The image being added is null. |
| ArgumentException | The image being added is not a Bitmap. |
.NET Framework
Available since 1.1
Available since 1.1
Show: