Share via


Picture Property

Specifies the graphics file to be displayed on the control. Available at design time and run time.

Control.Picture[ = cFileName ]

Property Values

  • cFileName
    Specifies a .bmp, .gif, .jpg or other graphics file.

Remarks

The setting for this property is a path to a graphics file.

Note   If you set the Picture property at design time and the file you specify does not exist, Microsoft Visual FoxPro displays an error message, but the property remains set to the file you specified. Visual FoxPro ignores the Picture property at run time if it is set to a file that does not exist.

Graphics are centered on the control. For CommandButton controls, the Style property must be set to 0 (Standard) for the bitmap to be displayed on the control; for CheckBox and OptionButton controls, the Style property must be set to 1 (Graphical).

For CommandButton and OptionButton controls, the specified bitmap is used whether a button is available, selected, or unavailable. You can specify a different bitmap for each button state using the DownPicture and DisabledPicture properties.

For Toolbars, the recommended dimensions are 16 by 15 pixels (width x height).

For details on valid graphics file formats, see Graphics Support in Visual FoxPro

See Also

DisabledPicture Property | DownPicture Property | Style Property

Applies To: CheckBox | CommandButton | Container Object | Control Object | Custom | Form | Image | OptionButton | Page | _SCREEN