Export (0) Print
Expand All
Expand Minimize

Stretch Property

Visual Studio .NET 2003

Specifies how an image is sized to fit inside a control. Available at design time and run time.

 [Form.]Control.Stretch[= nType]

Property Values

nType
The settings for the Stretch property are as follows.
Setting Description
0    (Default) Clip. The image is clipped to fit the control.
1    Isometric. The image resizes to fit the control while maintaining its original proportions.
2    Stretch. The image resizes to fit the control, but does not maintain its original proportions.

Remarks

You must set the Picture Property of the object before setting Stretch, or the Stretch setting will be ignored.

Example

CREATE FORM myForm nowait
oform=_vfp.ActiveForm
oform.ADDOBJECT("image1","image")
this1=oform.image1
this1.picture= HOME()+"\graphics\bitmaps\assorted\beanie.bmp"
this1.stretch=0
this1.height = 50
this1.width = 50

See Also

Autosize Property | Sizable Property

Applies To: Image | OLE Bound Control | OLE Container Control

Show:
© 2014 Microsoft