ScaleMode Property (AForm)

Returns or sets a value specifying the unit of measurement for coordinates of an object when using graphics methods or when positioning controls.

Syntax

Object.ScaleMode [ = enScaleMode ]

The ScaleMode property syntax has the following parts:

 

Name

Type

Description

Object

AForm

AForm object

enScaleMode

enumAFormScaleMode

An integer specifying the unit of measurement for coordinates of an object when using graphics methods or when positioning controls.

Where

enumAFormScaleMode:

 

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

Using the related ScaleHeight, ScaleWidth, ScaleLeft, and ScaleTop properties, you can create a custom coordinate system with both positive and negative coordinates. These four Scale properties interact with the ScaleMode property in the following ways:

Setting the value of 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.

Example

The following statement changes the AForm ScaleMode to centimeters:

frm1.ScaleMode=aformScaleModeCentimeters

Applies to

AForm

See Also

CurrentX, CurrentY, Scale, ScaleHeight, ScaleLeft, ScaleTop, ScaleWidth, ScaleX, ScaleY, StartUpPosition