ScaleX Method (AForm)

Converts the value for the width of an object from one of the ScaleMode units of measure to another.

Syntax

[ fWidthOut = ] Object.ScaleX ( fWidth [,nScaleModeFrom] [,nScaleModeTo] )

The ScaleX method syntax has the following parts:

 

Name

Type

Description

Object

AForm

AForm object

fWidthOut

Float

The new number after conversion to the new unit of measurement.

fWidth

Val Variant

Specifies the number to be converted from one unit of measure to the other.

nScaleModeFrom

Val enumAFormScaleMode

An integer specifying the unit of measurement from which the fWidth of the object is to be converted. The possible values of nScaleModeFrom are the same as for the ScaleMode property.

nScaleModeTo

Val enumAFormScaleMode

An integer specifying the unit of measurement to which the fWidth of the object is to be converted. The possible values of nScaleModeTo are the same as for the ScaleMode property.

Where

enumAFormScaleMode can be one of the following:

 

Name

Value

Description

aformScaleModeUser

0

User

aformScaleModeTwips

1

Twips

aformScaleModePoints

2

Points

aformScaleModePixels

3

Pixels

aformScaleModeCharacters

4

Characters

aformScaleModeInches

5

Inches

aformScaleModeMillimeters

6

Millimeters

aformScaleModeCentimeters

7

Centimeters

aformScaleModeHimetric

8

Himetric

Comments

The ScaleX and ScaleY methods take a value (width or height), with its unit of measure specified by nScaleModeFrom, and convert it to the corresponding value for the unit of measure specified by nScaleModeTo.

You can also use ScaleX and ScaleY with the PaintPicture method.

This method does not support named arguments.

Example

The following statement converts the X-coordinate scale on the AForm object from 10 centimeters to 10 inches:

ffrm1ScaleX1=frm1.ScaleX(10,aformScaleModeCentimeters,aformScaleModeInches)

Applies to

AForm

See Also

CurrentX, CurrentY, Scale, ScaleHeight, ScaleLeft, ScaleMode, ScaleTop, ScaleWidth, ScaleY