How to display bitmaps and animations
Supported picture formats are:
BMP
ICO
JPG
GIF
PNG
TIF
Supported animation formats are:
AVI
GIF
It is possible to display pictures and animations over the button surface using the following properties:
Picture property to change the picture or animation over the button surface
PictureMouseOver property to change the picture or animation over the button surface when the mouse is inside the button region.
PicturePressed property to change the picture or animation over the button surface when the mouse is pressed (animation available only for checkboxes).
PictureDisabled property to change the picture over the button surface when the button is disabled (animation not available in this state).
It is also possible to use the following methods:
SetPictureFromHandle function to change one of these three pictures using a bitmap loaded in memory, identified by a bitmap handle.
SetPictureFromMemory function to change one of these three pictures using a bitmap loaded in memory.
SetPictureFromNet function to change one of these three pictures using a bitmap loaded from the Internet.
SetAnimFromMemory function to change one of the button animations using an animation loaded in memory.
SetAnimFromNet function to change one of the button animations using an animation loaded from the Internet.
By default the picture is displayed in the center-middle of the button; to change the picture position use the
PicturePosition property to move the picture in predefined positions and the
PictureXOffset and
PictureYOffset properties to fine-tune the position.
To change the rendering of the picture when the button is pressed, use the
MovePictureOnPress property.
To keep the aspect ratio of a picture bigger than the control use the
PictureKeepRatio property.
It is possible to define a color that will be displayed as transparent using the
PictureTranspColor property: to make transparent the color of the picture background can be simpler to use the
PictureTranspMode property: if set to TRANSPMODE_USELEFTTOP_PIXEL (1) the control uses the picture Left Top pixel color as transparent color.
The picture currently on the button can be hidden/displayed using the
PictureVisible property.