Printer.ScaleX Method (Single, Int16, Int16)

 

Converts the value for the width 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

public float ScaleX(
    float value,
    short fromScale = 8,
    short toScale = -1
)
public:
float ScaleX(
    float value,
    short fromScale = 8,
    short toScale = -1
)
member ScaleX : 
        value:float32 *
        fromScale:int16 = 8 *
        toScale:int16 = -1 -> float32
Public Function ScaleX (
    value As Single,
    fromScale As Short,
    toScale As Short
) As Single

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 width 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 width 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. 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()

See Also

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

bc1bcb98-e13b-4c68-a514-045c042dbf364e434922-3709-49c6-a69d-38120ed72d7a7f9351ea-cb3e-4615-8f70-5a29c165c1a7

Return to top