Printer.Page Property
Returns the page number of the page that is currently being printed.
Namespace: Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6
Assembly: Microsoft.VisualBasic.PowerPacks.Vs (in Microsoft.VisualBasic.PowerPacks.Vs.dll)
Syntax
public short Page { get; }
public:
property short Page {
short get();
}
member Page : int16 with get
Public ReadOnly Property Page As Short
Property Value
Type: System.Int16
Returns a Short.
Remarks
Visual Basic keeps a count of pages that have been printed since your application started or since the last time the EndDoc method was called on the Printer object. This count starts at one and increases by one if:
You call the NewPage method.
You call the Print method and the text you want to print does not fit on the current page.
Note
If the output of a graphics method does not fit on the page, a new page is not generated. The output is clipped to fit the page's printable area.
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 retrieve the Page property value.
Dim Printer As New Printer
Printer.Print("This is page " & CStr(Printer.Page))
Printer.NewPage()
Printer.Print("This is page " & CStr(Printer.Page))
Printer.EndDoc()
See Also
Printer Class
Microsoft.VisualBasic.PowerPacks.Printing.Compatibility.VB6 Namespace
4e434922-3709-49c6-a69d-38120ed72d7abc1bcb98-e13b-4c68-a514-045c042dbf367f9351ea-cb3e-4615-8f70-5a29c165c1a7
Return to top