This documentation is archived and is not being maintained.

Visual Basic Reference

Visual Studio 6.0

ScaleLeft, ScaleTop Properties

See Also    Example    Applies To

Return or set the horizontal (ScaleLeft) and vertical (ScaleTop) coordinates for the left and top edges of an object when using graphics methods or when positioning controls.


object.ScaleLeft [= value]

object.ScaleTop [= value]

The ScaleLeft and ScaleTop property syntaxes have these parts:

Part Description
Object An object expression that evaluates to an object in the Applies To list.
Value A numeric expression specifying the horizontal or vertical coordinate. The default is 0.


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

  • Setting any other Scale property to any value automatically sets ScaleMode to 0. A ScaleMode of 0 is user-defined.

  • Setting the ScaleMode property to a number greater than 0 changes ScaleHeight and ScaleWidth to the new unit of measurement and sets ScaleLeft and ScaleTop to 0. The CurrentX and CurrentY property settings change to reflect the new coordinates of the current point.

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

Note   The ScaleLeft and ScaleTop properties aren't the same as the Left and Top properties.