Share via


Printer.CurrentY Property

Gets or sets the vertical coordinates for the next printing or drawing method.

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

Syntax

'Declaration
Public Property CurrentY As Single
'Usage
Dim instance As Printer 
Dim value As Single 

value = instance.CurrentY

instance.CurrentY = value
public float CurrentY { get; set; }
public:
property float CurrentY {
    float get ();
    void set (float value);
}
public function get CurrentY () : float 
public function set CurrentY (value : float)

Property Value

Type: System.Single
Returns a Single.

Remarks

Coordinates are measured from the upper-left corner of a page. The CurrentX property setting is 0 at the page's left edge, and the CurrentY property setting is 0 at its top edge. Coordinates are expressed in twips, or the current unit of measurement defined by the ScaleHeight, ScaleWidth, ScaleLeft, ScaleTop, and ScaleMode properties.

When you call the following Printer methods, the CurrentX and CurrentY settings change as indicated in the following table.

This method

Sets CurrentX, CurrentY to

Circle

The center of the object.

EndDoc

0, 0

Line

The end point of the line.

NewPage

0, 0

Print

The next print position.

PSet

The point drawn.

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 how to set the CurrentX and CurrentY properties. In this case, it prints text 500 twips from the top edge of the page and 500 twips from the left edge of a page.

Dim Printer As New Printer
Printer.CurrentX = 500
Printer.CurrentY = 500
Printer.Print("Hello")
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