How to: Capture User Input from a PrintDialog at Run Time
While you can set options related to printing at design time, you will sometimes want to change these options at run time, most likely because of choices made by the user. You can capture user input for printing a document using theand the components.
To change print options programmatically
Add a PrintDialog and a PrintDocument component to your form.
Set theproperty of the PrintDialog to the PrintDocument added to the form.
Display the PrintDialog component by using themethod.
The user's printing choices from the dialog will be copied to theproperty of the PrintDocument component.