For picture controls

Applies to

Picture, PictureButton, and PictureHyperLink controls, UserObject used as tab page

Description

The PictureName property specifies the name or URL of the file that contains the picture displayed in the control.

For PictureButton controls, the picture specified by the PictureName property is the one that is displayed when the button is enabled.

The picture can be in the following formats:

  • bitmap (.BMP)

  • runlength encoded (.RLE)

  • Windows metafile (.WMF)

  • GIF (.GIF)

  • JPEG (.JPG or .JPEG)

Usage

In a painter

To specify the picture for a Picture control and for the enabled state of a PictureButton:

  • Enter the name or URL of the file in the PictureName field on the General page of the control's Properties view, or use the ellipsis button next to the PictureName field to select a file from the Select Image dialog box.

In scripts

The PictureName property takes a string value.

The following line selects a picture file for a PictureButton pb_1:

pb_1.PictureName = "c:\pictures\pb1.bmp"