Returns or sets a value which determines the color that will be transparent in the object graphical operations.
Object.MaskColor [ = lMaskColor ]
The MaskColor property syntax has the following parts:
|
Name |
Type |
Description |
|
Object |
AImageList |
AImageList control |
|
lMaskColor |
An integer specifying the color that will be transparent in the object graphical operations. |
Every image in an AImageListImages collection has a corresponding mask associated with it. The mask is a monochrome image derived from the image itself, automatically generated using the MaskColor property as the specific color of the mask. This mask is not used directly, but is applied to the original bitmap in graphical operations such as the Overlay method. For example, the MaskColor property determines which color of an image will be transparent in the Overlay method.
If the system colors change, then the color which is transparent will change, making the look of your picture unpredictable. It is good programming practice to use non-system colors.
The following statement sets the MaskColor to red:
imgl1.MaskColor=aclrRed