NewImageList |
Description
Adds an imagelist to a form |
Syntax
[Set oCtl =] oFrm. NewImageList |
( Name, ImageWidth, ImageHeight ) |
Parameters
Part |
Description |
Set oCtl = |
(optional) Store a reference to the new control in the variable oCtl. This variable can be used to access the control's properties and methods |
oFrm |
A reference to a form object (see the NewForm method) |
Name |
The name of the control. It must be unique within the form and may not be empty or start with an asterisk (*) |
ImageWidth |
See the list of properties below |
ImageHeight |
See the list of properties below |
Properties and Methods
Property |
Description |
|
BackColor |
The background color (use the RGB function to assign a color value) |
|
ImageHeight |
The height of ListImage objects in the ImageList, measured in pixels. Note You can the use the ImageList control with any control by setting the Picture property of the second control to the Picture object of any image contained by the ImageList control. However, the size of the displayed image will not be affected by the ImageHeight and ImageWidth properties. In other words, the second control will display the image at its original size . |
|
ImageWidth |
The height of ListImage objects in the ImageList, measured in pixels. |
|
ListImages |
A reference to a collection of ListImage objects. |
|
MaskColor |
The color used to create masks (use the RGB function to specify a color). |
|
Tag |
(reserved) Used internally to store the user-defined controlname |
|
UseMask |
(boolean) Determines whether the MaskColor will be used as a mask |
|
Method |
Description |
|
Overlay |
Parameters: Index1, Index2 |
|
Draws one ListImage over another, and returns the result |
||
Index1 |
An integer (Index property) or unique string (Key property) that specifies the image to be overlaid |
|
Index2 |
An integer (Index property) or unique string (Key property) that specifies the image to be drawn over the object specified in Index1. The color of the image that matches the MaskColor property is made transparent. If no color matches, the image is drawn opaquely over the other image . |
|
Use the Overlay method in conjunction with the MaskColor property to create a single image from two disparate images. The Overlay method imposes one bitmap over another to create a third, composite image. The MaskColor determines which color of the overlaying image is transparent |
Example
See the NewListView page for an example of using an ImageList with a ListView control |