ScaleMode Property

See AlsoQ1JOK2              Example3OBP5WR>Low

Applies To

Form14TJ2LN, picture box31MYIWX, Printer objectCBQUDQ.


Determines the unit of measurement for coordinates of an object when using graphics methodsAY3LGR or when positioning controls.


{ [form.][picturebox.]|Printer.}ScaleMode[ = mode ]


The ScaleMode property settings are:

Setting          Description


0                   Indicates that one or more of the ScaleHeight, ScaleWidth3J8U7ZN, ScaleLeft, and ScaleTop138Z3ME properties are set to custom values.

1                   (Default) Twip2SWJ8D3 (1440 twips per logical inch; 567 twips per logical centimeter).

2                   Point95MO9S3 (72 points per logical inch).

3                   PixelZ40N3B (smallest unit of monitor or printer resolution).

4                   Character (horizontal = 120 twips per unit; vertical = 240 twips per unit).

5                   Inch.

6                   Millimeter.

7                   Centimeter.



Using the related ScaleHeight, ScaleWidth3J8U7ZN, ScaleLeft, and ScaleTop138Z3ME 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.

         Setting ScaleMode 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 CurrentY9TOITD property settings will change to reflect the new coordinates of the current point.


Data Type

IntegerDOKXHY (Enumerated)

See Also


DrawMode Property2ZATBSD

DrawStyle Property4PNS0NQ

FillColor PropertyL2TW7M

ForeColor Property1W9T6JQ

Scale MethodQ2ADWT

ScaleHeight, ScaleWidth Properties3J8U7ZN

ScaleLeft, ScaleTop Properties138Z3ME


Programmer's Guide:

Chapter 15, "Creating Graphics for Applications"

Chapter 16, "Displaying and Printing Information"

ScaleMode Property Example

The example shows how different ScaleMode property settings change the size of a circle.  To try this example, paste the code into the Declarations section of a form.  Then press F5 and click the form.   When you click the form, the unit of measurement changes to the next ScaleMode setting and a circle is drawn on the form.

Sub Form_Click ()

   ' Cycle through each of 7 ScaleModes.

   ScaleMode = ((ScaleMode + 1) Mod 7) + 1

   ' Draw a circle with radius of 2 in center of form.

   Circle (ScaleWidth / 2, ScaleHeight / 2), 2

End Sub