ScaleX

This method converts horizontal coordinate values in a Form or PictureBox control from one ScaleMode setting to another.

Syntax

object.ScaleX(value, fromscale, toscale)

Parameters

object
Optional. Object expression that evaluates to a Form or PictureBox control. If object is omitted, the Form object with the focus is assumed to be object.
value
Required. Value thay specifies, for object, the number of units of measure to be converted.
fromscale
Optional. Constant or value that specifies the coordinate system from which value is to be converted.
toscale
Optional. Constant or value that specifies the coordinate system to which value is to be converted. The possible values of toscale are the same as the values for fromscale.

Return Value

Value of the X coordinate in the new coordinate system.

Remarks

The ScaleX and ScaleY methods take a value, with its unit of measure specified by fromscale, and convert it to the corresponding value for the unit of measure specified by toscale.

The following table shows the settings for fromscale and toscale.

Constant
Value
Description
vbUser 0 User-defined; indicates that the width or height of object is set to a custom value
VbTwips 1 Twip (1440 twips per logical inch; 567 twips per logical centimeter)
VbPoints 2 Point (72 points per logical inch)
VbPixels 3 Pixel (smallest unit of monitor or printer resolution)
VbCharacters 4 Character (horizontal = 120 twips per unit; vertical = 240 twips per unit)
VbInches 5 Inch
VbMillimeters 6 Millimeter
VbCentimeters 7 Centimeter