Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 1.1
.NET Framework
Reference
Class Library
PageSettings Class
Methods
 SetHdevmode Method
This page is specific to
Microsoft Visual Studio 2003/.NET Framework 1.1

Other versions are also available for the following:
.NET Framework Class Library
PageSettings.SetHdevmode Method

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: 

See Also

PageSettings Class | PageSettings Members | System.Drawing.Printing Namespace | CopyToHdevmode

© 2010 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker