Gets or sets the printer that prints the document.
Assembly: System.Drawing (in System.Drawing.dll)
public function get PrinterSettings () : PrinterSettings public function set PrinterSettings (value : PrinterSettings)
You can specify several printer settings through the property. For example, use the PrinterSettings.Copies property to specify the number of copies you want to print, the PrinterSettings.PrinterName property to specify the printer to use, and the PrinterSettings.PrintRange property to specify the range of pages you want to print.
The following code example prints a document on the specified printer. The example makes three assumptions: that a variable names filePath has been set to the path of the file to print; that a method named pd_PrintPage, which handles the PrintPage event, has been defined; and that a variable named printer has been set to the printer's name.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.