Hacker’s Guide to Visual FoxPro
An irreverent look at how Visual FoxPro really works. Tells you the inside scoop on every command, function, property, event and method of Visual FoxPro.
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
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.
imgImage.Stretch = 1