Specifies how to display the background picture on a control, form, or page.
Syntax
object.PictureSizeMode [=PictureSizeMode]
The PictureSizeMode property syntax has these parts:
Part | Description |
---|---|
object | Required. A valid object. |
PictureSizeMode | 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 PictureSizeMode are:
Value | Description |
---|---|
0 | Crops any part of the picture that is larger than the form or page (default). |
1 | Stretches the picture to fill the form or page. This setting distorts the picture in either the horizontal or vertical direction. |
3 | Enlarges the picture, but does not distort the picture in either the horizontal or vertical direction. |
Remarks
The PictureSizeModeClip setting indicates 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 1 and 3 settings both enlarge the image, but 1 causes distortion. The 1 setting enlarges the image horizontally and vertically until the image reaches the corresponding edges of the container or control. The 3 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.
Note Setting the PictureSizeMode property to 2 overrides PictureAlignment. When PictureSizeMode is set to 2, the picture fills the entire control or container.