| title | ms.custom | ms.date | ms.prod | ms.reviewer | ms.suite | ms.technology | ms.tgt_pltfrm | ms.topic | dev_langs | helpviewer_keywords | ms.assetid | caps.latest.revision | author | ms.author | manager | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows Forms Print Support |
03/30/2017 |
.net-framework |
|
article |
|
|
a4a2960c-eb70-48e2-b641-cfb222704e46 |
12 |
dotnet-bot |
dotnetcontent |
wpickett |
Windows Forms Print Support
Printing in Windows Forms consists primarily of using the PrintDocument Component component to enable the user to print, and the PrintPreviewDialog Control control, PrintDialog Component and PageSetupDialog Component components to provide a familiar graphical interface to users accustomed to the Windows operating system.
Typically, you create a new instance of the xref:System.Drawing.Printing.PrintDocument component, set the properties that describe what to print using the xref:System.Drawing.Printing.PrinterSettings and xref:System.Drawing.Printing.PageSettings classes, and call the xref:System.Drawing.Printing.PrintDocument.Print%2A method to actually print the document.
During the course of printing from a Windows-based application, the xref:System.Drawing.Printing.PrintDocument component will show an abort print dialog box to alert users to the fact that printing is occurring and to allow the print job to be canceled.
In This Section
How to: Create Standard Windows Forms Print Jobs
Explains how to use the xref:System.Drawing.Printing.PrintDocument component to print from a Windows Form.
How to: Capture User Input from a PrintDialog at Run Time
Explains how to modify selected print options programmatically using the xref:System.Windows.Forms.PrintDialog component.
How to: Choose the Printers Attached to a User's Computer in Windows Forms
Describes changing the printer to print to using the xref:System.Windows.Forms.PrintDialog component at run time.
How to: Print Graphics in Windows Forms
Describes sending graphics to the printer.
How to: Print a Multi-Page Text File in Windows Forms
Describes sending text to the printer.
How to: Complete Windows Forms Print Jobs
Explains how to alert users to the completion of a print job.
How to: Print a Windows Form
Shows how to print a copy of the current form.
How to: Print in Windows Forms Using Print Preview
Shows how to use a xref:System.Windows.Forms.PrintPreviewDialog for printing a document.
Related Sections
PrintDocument Component
Explains usage of the xref:System.Drawing.Printing.PrintDocument component.
PrintDialog Component
Explains usage of the xref:System.Windows.Forms.PrintDialog component.
PrintPreviewDialog Control
Explains usage of the xref:System.Windows.Forms.PrintPreviewDialog control.
PageSetupDialog Component
Explains usage of the xref:System.Windows.Forms.PageSetupDialog component.
xref:System.Drawing.Printing
Describes the classes in the xref:System.Drawing.Printing namespace.