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)

public float CurrentY { get; set; }

Property Value

Type: System.Single
Returns a Single.

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


The center of the object.


0, 0


The end point of the line.


0, 0


The next print position.


The point drawn.


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 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

Community Additions