PictureSizeMode property

Specifies how to display the background picture on a control, form, or page.

Syntax

object.PictureSizeMode [= fmPictureSizeMode ]

The PictureSizeMode property syntax has these parts:

Part Description
object Required. A valid object.
fmPictureSizeMode Optional. The action to take if the picture and the form or page that contains it are not the same size.

Settings

The settings for fmPictureSizeMode are:

Constant Value Description
fmPictureSizeModeClip 0 Crops any part of the picture that is larger than the form or page (default).
fmPictureSizeModeStretch 1 Stretches the picture to fill the form or page. This setting distorts the picture in either the horizontal or vertical direction.
fmPictureSizeModeZoom 3 Enlarges the picture, but does not distort the picture in either the horizontal or vertical direction.

Remarks

The fmPictureSizeModeClip setting indicates that you want to show the picture in its original size and scale. If the form or page is smaller than the picture, this setting only shows the part of the picture that fits within the form or page.

The fmPictureSizeModeStretch and fmPictureSizeModeZoom settings both enlarge the image, but fmPictureSizeModeStretch causes distortion.

The fmPictureSizeModeStretch setting enlarges the image horizontally and vertically until the image reaches the corresponding edges of the container or control.

The fmPictureSizeModeZoom setting enlarges the image until it reaches either the horizontal or vertical edges of the container or control. If the image reaches the horizontal edges first, any remaining distance to the vertical edges remains blank. If it reaches the vertical edges first, any remaining distance to the horizontal edges remains blank.

See also

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.