Destroy

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


View Updates

Copyright © 2002 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. All Rights Reserved.



Hacker's Guide to Visual FoxPro 7. 0
Hackers Guide to Visual FoxPro 7.0
ISBN: 1930919220
EAN: 2147483647
Year: 2001
Pages: 899

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net