Printer.CurrentX Property

Gets or sets the horizontal 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 Property CurrentX As Single
Dim instance As Printer 
Dim value As Single 

value = instance.CurrentX

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

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

.NET Framework Security

See Also


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