Share via


Printer.ScaleY Method

Converts the value for the height of a page from one of the units of measure of the ScaleMode property to another.

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

Syntax

'Declaration
Public Function ScaleY ( _
    value As Single, _
    fromScale As Short, _
    toScale As Short _
) As Single
'Usage
Dim instance As Printer 
Dim value As Single 
Dim fromScale As Short 
Dim toScale As Short 
Dim returnValue As Single 

returnValue = instance.ScaleY(value, fromScale, _
    toScale)
public float ScaleY(
    float value,
    short fromScale,
    short toScale
)
public:
float ScaleY(
    float value, 
    short fromScale, 
    short toScale
)
public function ScaleY(
    value : float, 
    fromScale : short, 
    toScale : short
) : float

Parameters

  • value
    Type: System.Single

    Specify the number of units of measure to be converted.

  • fromScale
    Type: System.Int16

    Optional. A constant or value specifying the coordinate system from which the height of the object is to be converted. The possible values of fromScale are the same as those for the ScaleMode property.

  • toScale
    Type: System.Int16

    Optional. A constant or value specifying the coordinate system to which the height of the object is to be converted. The possible values of toScale are the same as those for the ScaleMode property.

Return Value

Type: System.Single
Returns a Single.

Remarks

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

Note

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 2008. 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 calling the ScaleX and ScaleY methods.

Dim Printer As New Printer
Printer.ScaleX(Printer.Width, vbTwips, vbInches)
Printer.ScaleY(Printer.Height, vbTwips, vbInches)
Printer.DrawStyle = vbSolid
Printer.Line(1, 1, 4, 4, vbRed, True)
Printer.EndDoc()

.NET Framework Security

See Also

Reference

Printer Class

Printer Members

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