ScaleHeight

This property returns and sets the number of units for the vertical measurement of the interior of an object. Use this property in conjunction with graphics methods or with the positioning of controls.

Syntax

object.ScaleHeight [= value]

Parameters

object
Object expression that evaluates to a PictureBox control or Form object.
value
Numeric expression that specifies the horizontal or vertical measurement.

Remarks

You can use this property to create a custom coordinate scale for drawing. For example, the code example ScaleHeight = 100 changes the units of measure of the actual interior height of the form. Instead of the height being n current units—measured in twips, pixels, and so on—the height will be 100 user-defined units. Therefore, a distance of 50 units is half the height/width of the object, and a distance of 101 units will be off the object by 1 unit.

Use the ScaleMode property to define a scale based on a standard unit of measurement, such as twips, points, pixels, characters, inches, millimeters, or centimeters.

Setting this property to a positive value increases the coordinates from top to bottom. Setting this to a negative value increases the coordinates from bottom to top.

Using this property and the related ScaleWidth, ScaleLeft and ScaleTop properties, you can set up a full coordinate system with both positive and negative coordinates. All four of these Scale properties interact with the ScaleMode property in the following ways:

You also can use the Scale method to set the ScaleHeight, ScaleWidth, ScaleLeft, and ScaleTop properties in one statement.

The ScaleHeight and ScaleWidth properties are not the same as the Height and Width properties.