Stretch

This property determines how an Image or OLE control is displayed. The image can be displayed in three different ways: at its full resolution where it might be cropped to fit within the space allowed; stretched or shrunk to fit the space but maintain its proportions; or distorted so that all of the image is squashed into the space allowed

Usage

oObject.Stretch = nStretchValue
nStretchValue = oObject.Stretch

Parameter

Value

Meaning

nStretchValue

0

Clip. No change to the original pixels of the original image. If the image is larger than the space allowed, the upper-left corner of the image is displayed.

1

Isometric. The image is stretched or shrunk to show the best proportional image possible within the space allowed.

2

Stretch. The image is stretched or shrunk to fit the space.


Figure 1 illustrates the results of the three different settings. We hardly ever use anything other than the Isometric setting, but Microsoft chose the Clip option as the default. We suspect they did this because that setting requires the least processing.

Figure 1: Different settings of Stretch result in markedly different results!

Example

imgImage.Stretch = 1

See Also

Image, OLEBoundControl, OLEControl


Back to Table of Contents

Copyright © 2002-2018 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. Click for license .