PrintPageEventArgs

PrintPageEventArgs

System.Drawing.Printing (system.drawing.dll) class

This class encapsulates the data for the PrintDocument.PrintPage event.

You should handle this event and paint the page's imagery on the supplied Graphics surface. To determine how the page should be printed, you can use the MarginBounds , PageBounds , and PageSettings .

If the document contains more pages that need printing, you should set the HasMorePages property to true, but if not, set it to false and the print job will be completed.

To abandon the print job, you can set the Cancel property.

 public class  PrintPageEventArgs  : EventArgs {  // Public Constructors  public  PrintPageEventArgs  (System.Drawing.Graphics  graphics  , System.Drawing.Rectangle  marginBounds  ,          System.Drawing.Rectangle  pageBounds  , PageSettings  pageSettings  );  // Public Instance Properties  public bool  Cancel  {set; get; }    public Graphics  Graphics  {get; }    public bool  HasMorePages  {set; get; }    public Rectangle  MarginBounds  {get; }    public Rectangle  PageBounds  {get; }    public PageSettings  PageSettings  {get; } } 

Hierarchy

System.Object System.EventArgs PrintPageEventArgs

Passed To

PrintController.{OnEndPage() , OnStartPage()} , PrintDocument.OnPrintPage() , PrintPageEventHandler.{BeginInvoke() , Invoke()}



. Net Windows Forms in a Nutshell
.NET Windows Forms in a Nutshell
ISBN: 0596003382
EAN: 2147483647
Year: 2002
Pages: 794

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net