Printer.ScaleY Method (Single, Int16, Int16)
Converts the value for the height of a page from one of the units of measure of the ScaleMode property to another.
Assembly: Microsoft.VisualBasic.PowerPacks.Vs (in Microsoft.VisualBasic.PowerPacks.Vs.dll)
public float ScaleY( float value, short fromScale = 8, short toScale = -1 )
public: float ScaleY( float value, short fromScale = 8, short toScale = -1 )
member ScaleY : value:float32 * fromScale:int16 = 8 * toScale:int16 = -1 -> float32
Public Function ScaleY ( value As Single, fromScale As Short, toScale As Short ) As Single
Specify the number of units of measure to be converted.
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.
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.
Returns a Single.
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.
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.
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()
Return to top