PageSettings.SetHdevmode Method
.NET Framework 1.1
Copies relevant information to the PageSettings from the specified DEVMODE structure.
[Visual Basic] Public Sub SetHdevmode( _ ByVal hdevmode As IntPtr _ ) [C#] public void SetHdevmode( IntPtr hdevmode ); [C++] public: void SetHdevmode( IntPtr hdevmode ); [JScript] public function SetHdevmode( hdevmode : IntPtr );
Parameters
- hdevmode
- The handle to a Win32 DEVMODE structure.
Exceptions
| Exception Type | Condition |
|---|---|
| ArgumentException | The printer handle is invalid. |
| InvalidPrinterException | The printer named in the PrinterSettings.PrinterName property does not exist or there is no default printer installed. |
Remarks
Use this method to copy relevant information in a DEVMODE structure to the PageSettings.
To copy information from the PageSettings to a DEVMODE, call CopyToHdevmode.
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
.NET Framework Security:
- PrintingPermission for printing and access to all printers on the network. Associated enumeration: PrintingPermissionLevel.AllPrinting
See Also
PageSettings Class | PageSettings Members | System.Drawing.Printing Namespace | CopyToHdevmode