PrinterSettings.GetHdevmode Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a handle to a DEVMODE
structure that corresponds to the printer settings.
Overloads
GetHdevmode() |
Creates a handle to a |
GetHdevmode(PageSettings) |
Creates a handle to a |
GetHdevmode()
- Source:
- PrinterSettings.cs
- Source:
- PrinterSettings.cs
- Source:
- PrinterSettings.cs
- Source:
- PrinterSettings.cs
- Source:
- PrinterSettings.cs
Creates a handle to a DEVMODE
structure that corresponds to the printer settings.
public:
IntPtr GetHdevmode();
public IntPtr GetHdevmode ();
member this.GetHdevmode : unit -> nativeint
Public Function GetHdevmode () As IntPtr
Returns
nativeint
A handle to a DEVMODE
structure.
Exceptions
The printer named in the PrinterName property does not exist.
The printer's initialization information could not be retrieved.
Remarks
DEVMODE
structures are device specific. Copying a DEVMODE
structure from one PrinterSettings to a PrinterSettings for a different printer is not supported. When you are done with the handle that is created through this method, you must deallocate it yourself by calling the native Win32 GlobalFree
method. When you call this method, you pass as a parameter the return value from the GetHdevmode method.
Applies to
GetHdevmode(PageSettings)
- Source:
- PrinterSettings.cs
- Source:
- PrinterSettings.cs
- Source:
- PrinterSettings.cs
- Source:
- PrinterSettings.cs
- Source:
- PrinterSettings.cs
Creates a handle to a DEVMODE
structure that corresponds to the printer and the page settings specified through the pageSettings
parameter.
public:
IntPtr GetHdevmode(System::Drawing::Printing::PageSettings ^ pageSettings);
public IntPtr GetHdevmode (System.Drawing.Printing.PageSettings pageSettings);
member this.GetHdevmode : System.Drawing.Printing.PageSettings -> nativeint
Public Function GetHdevmode (pageSettings As PageSettings) As IntPtr
Parameters
- pageSettings
- PageSettings
The PageSettings object that the DEVMODE
structure's handle corresponds to.
Returns
nativeint
A handle to a DEVMODE
structure.
Exceptions
The printer named in the PrinterName property does not exist.
The printer's initialization information could not be retrieved.
Remarks
DEVMODE
structures are device specific. Copying a DEVMODE
structure from one PrinterSettings to a PrinterSettings for a different printer is not supported.
When you are done with the handle that is created through this method, you must deallocate it yourself by calling the native Win32 GlobalFree
method. When you call this method, you pass as a parameter the return value from the GetHdevmode method.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기