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)

Syntax

public float CurrentX { get; set; }
public:
property float CurrentX {
    float get();
    void set(float value);
}
member CurrentX : float32 with get, set
Public Property CurrentX As Single

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. 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()

See Also

Printer Class
Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6 Namespace

bc1bcb98-e13b-4c68-a514-045c042dbf367f9351ea-cb3e-4615-8f70-5a29c165c1a74e434922-3709-49c6-a69d-38120ed72d7a

Return to top