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)
'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
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 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.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.