User32GetDpiForWindow Method
Returns the dots per inch (dpi) value for the associated window.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll", ExactSpelling = true, SetLastError = true)]
public static uint GetDpiForWindow(
IntPtr hWnd
)
<DllImportAttribute("User32.dll", ExactSpelling := true, SetLastError := true>]
Public Shared Function GetDpiForWindow (
hWnd As IntPtr
) As UInteger
Dim hWnd As IntPtr
Dim returnValue As UInteger
returnValue = User32.GetDpiForWindow(hWnd)
public:
[DllImportAttribute(L"User32.dll", ExactSpelling = true, SetLastError = true)]
static unsigned int GetDpiForWindow(
IntPtr hWnd
)
[<DllImportAttribute("User32.dll", ExactSpelling = true, SetLastError = true)>]
static member GetDpiForWindow :
hWnd : IntPtr -> uint32
No code example is currently available or this language may not be supported.
- hWnd IntPtr
-
The window you want to get information about.
UInt32
The DPI for the window which depends on the
DpiAwareness of the window.
An invalid
hWnd value will result in a return value of 0.