Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than gdi32, prefix the name with the module name and a period.
getdevicecaps (gdi32)
.
C# Signature:
[DllImport("gdi32.dll")]
static extern int GetDeviceCaps(IntPtr hdc, int nIndex);
VB.NET Signature:
<DllImport("gdi32.dll")> _
Public Shared Function GetDeviceCaps(ByVal hDC As IntPtr, ByVal nIndex As Integer) As Integer
End Function
User-Defined Types:
You can use the following enumeration for passing in as nIndex:
// Printing related DeviceCaps. These replace the appropriate Escapes
PHYSICALWIDTH = 110,
PHYSICALHEIGHT = 111,
PHYSICALOFFSETX = 112,
PHYSICALOFFSETY = 113,
SCALINGFACTORX = 114,
SCALINGFACTORY = 115
}
Notes:
None.
Tips & Tricks:
Please add some!
Sample Code:
Please add some!
Alternative Managed API:
System.Windows.Forms.Screen.PrimaryScreen (Matt M Jacobsen)
The GetDeviceCaps API
11/8/2022 12:09:19 PM - -93.92.200.212
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).