Printer.ScaleTop Property

Gets or sets the vertical coordinates for the top edge of the page when you are using graphics methods.

Namespace:  Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6
Assembly:  Microsoft.VisualBasic.PowerPacks.Vs (in Microsoft.VisualBasic.PowerPacks.Vs.dll)

Syntax

'Declaração
Public Property ScaleTop As Single
    Get
    Set
public float ScaleTop { get; set; }
public:
property float ScaleTop {
    float get ();
    void set (float value);
}
member ScaleTop : float32 with get, set
function get ScaleTop () : float
function set ScaleTop (value : float)

Property Value

Type: System.Single
Returns a Single.

Remarks

By using the ScaleLeft and ScaleTop properties and the related ScaleHeight and ScaleWidth properties, you can set up a coordinate system with both positive and negative coordinates. These four scale properties interact with the ScaleMode property in the following ways:

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

  • Setting ScaleMode to a number larger than 0 changes ScaleHeight and ScaleWidth to the new unit of measurement and sets ScaleLeft and ScaleTop to 0. In addition, the CurrentX and CurrentY 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.

Observação

Functions and objects in the Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6 namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic 2010. In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation.

Examples

The following example demonstrates how to set the ScaleLeft and ScaleTop properties to draw a circle twice.

Dim Printer As New Printer
Dim Radius As Integer = 200
Printer.Circle(500, 500, Radius)
Printer.ScaleLeft = 100
Printer.ScaleTop = 100
Printer.Circle(500, 500, Radius)
Printer.EndDoc()

.NET Framework Security

See Also

Reference

Printer Class

Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6 Namespace

Other Resources

Printer Compatibility Library

How to: Fix Upgrade Errors by Using the Printer Compatibility Library (Visual Basic)

Deploying Applications That Reference the Printer Compatibility Library