MaskColor Property (AImageList)

Returns or sets a value which determines the color that will be transparent in the object graphical operations.

Syntax

Object.MaskColor [ = lMaskColor ]

The MaskColor property syntax has the following parts:

 

Name

Type

Description

Object

AImageList

AImageList control

lMaskColor

AColor

An integer specifying the color that will be transparent in the object graphical operations.

Comments

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.

Example

The following statement sets the MaskColor to red:

imgl1.MaskColor=aclrRed

Applies to

AImageList

See Also

Clear, UserMaskColor