Using the PrintDocument Component
Implement print capability.
Printing in the .NET Framework is managed by the PrintDocument class. Typically, you create a new instance of the PrintDocument class, set its properties, and call its Print() method. Calling the method causes the PrintDocument.PrintPage event to occur. You determine what will be printed by adding a handler for this event. In the PrintPage event, you can retrieve and manipulate a Graphics object that lets you treat the next page to be printed as a canvas to draw on. By using the methods of the Graphics class, as well as associated objects (such as the Font or Brush objects), you can determine what to print.
The following sections explain how you can use this printing scheme to print ...