Windows Forms 2.0 has full support for utilizing the rich printing infrastructure that is part of Windows. This section gives you an overview of the components and controls that belong to the "Printing" category in the designer Toolbox. The PageSetupDialog ComponentThe PageSetupDialog is used to present the user with the familiar Page Setup preferences dialog. The results of this dialog are made available as properties on the component after the user confirms his or her selections. The PrintDialog ComponentThe PrintDialog component is used to present the user with a dialog that prompts him to select a printer and other printing options such as page orientation, color, and so on. The PrintDocument ComponentThe PrintDocument component provides a set of properties and methods that allow developers to send data directly to a printer without having to know the specifics of the printer. This component is used quite often by developers to print lists of data contained on currently displayed forms. The PrintPreviewControl ComponentThe PrintPreviewControl is a trimmed-down version of the PrintPreviewDialog. This control displays only a preview of the document that is about to be printed as indicated by the Document property, which is of type PrintDocument. The PrintPreviewDialog ComponentThe PrintPreviewDialog component is used to present the user with the full print preview dialog, including confirmation buttons that will print the preview, and so on. |