McBasic™Get McBasic™ ↗
Build 881
Components · Nonvisual component
ImageList component icon

ImageList

Share named image assets across compatible visual controls.

3 properties0 events0 methods

Use it in a Form#

A shared list avoids embedding the same image configuration in every consumer. Resource names are project identities; they are not arbitrary absolute file paths. Preserve the declared assets when copying or packaging the project.

Add ImageList to the component tray and name it imgListMain for this example:

PropertyExample value
Images"Logo=Logo\nSecondary=Logo"

Use the full lesson for the owner’s initialization code and its complete layout.

Properties#

Contract defaults are shown below. Where a new control has a different Designer starting value, that value is listed separately.

Images

StringDefault: ""Designer only

One declared project image resource per line, optionally Key=ResourceName. Keys are case-insensitive and resources load only in a trusted Run.

Count

LongDefault: 0Read only in BASICNot in InspectorNot serialized

Read-only number of images currently in the collection (VB6 ListImages.Count). In code, ImageList1.ListImages(index).Picture, with a one-based index or a Key, is the resource name of that image, to assign to an Image, PictureBox, CommandButton or Form Picture.

Range: 0 to 100000.

Error

StringDefault: ""Read only in BASICNot in InspectorNot serialized

Read-only load error text; empty when every current image resource is valid.

Events and parameters#

Replace control with the object’s Name when creating a handler. ByRef arguments may be changed by your handler; ByVal arguments report an input value.

No events are declared.

Methods#

No methods are declared in this component’s built-in metadata. Use its documented properties and events; do not infer APIs from a similarly named control in another framework.

Source baseline 20f4bfed6b · Build manifest