ScaleWidth property (Main Control)

Visual Basic example
Visual C++ 4.0 example

Access 2.0 example

Access 95, 97 example
Visual J++ example

Syntax float ScaleWidth

Overview:  Refer to Displaying an Image.

Remarks

(Persistent property, available at design time) Is the width of the client area of the Main Control.

This is the true client area, which you can use when painting to fit a destination rectangle to the bitmap. The unit of measure is determined by the ScaleMode property.

If you write this property, the actual width of the control does not change, but the current width is expressed using the value that you provide. This lets you use a custom coordinate system. For example, you could set the ScaleWidth and ScaleHeight both to 100; then express all coordinates as percentage offsets. For examples of a custom coordinate system, refer to the ScaleTop property.

See Also

Elements:  ScaleMode property, ScaleHeight property, ScaleLeft property, ScaleTop property

Topics:  Working with the Control: Client Area Usage
Raster Images: Displaying Images