User32GetSystemDpiForProcess Method
Retrieves the system DPI associated with a given process.
This is useful for avoiding compatibility issues that arise from sharing DPI-sensitive information
between multiple system-aware processes with different system DPI values.
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 GetSystemDpiForProcess(
IntPtr hProcess
)
<DllImportAttribute("User32.dll", ExactSpelling := true, SetLastError := true>]
Public Shared Function GetSystemDpiForProcess (
hProcess As IntPtr
) As UInteger
Dim hProcess As IntPtr
Dim returnValue As UInteger
returnValue = User32.GetSystemDpiForProcess(hProcess)
public:
[DllImportAttribute(L"User32.dll", ExactSpelling = true, SetLastError = true)]
static unsigned int GetSystemDpiForProcess(
IntPtr hProcess
)
[<DllImportAttribute("User32.dll", ExactSpelling = true, SetLastError = true)>]
static member GetSystemDpiForProcess :
hProcess : IntPtr -> uint32
No code example is currently available or this language may not be supported.
- hProcess IntPtr
-
The handle for the process to examine.
If this value is Zero, this API behaves identically to GetDpiForSystem.
UInt32
The process's system DPI value.