PrintDialog.Document Property


Gets or sets a value indicating the PrintDocument used to obtain PrinterSettings.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

member Document : PrintDocument with get, set

Property Value

Type: System.Drawing.Printing.PrintDocument

The PrintDocument used to obtain PrinterSettings. The default is null.

The following code example demonstrates how to use the PrintDialog control to set the AllowSomePages, ShowHelp, and Document properties. To run this example, paste the following code into a form that contains a PrintDialog control named PrintDialog1 and a button named Button1. This example requires that the button's Click event and the PrintPage event of docToPrint have been connected to the event-handling methods defined in this example.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top