DpiAwareness.EnterDpiScope 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.
Overloads
EnterDpiScope(DpiAwarenessContext) |
Enters a scope during which the current thread's DPI awareness context is set to
|
EnterDpiScope(IntPtr) |
Enters a scope during which the current thread's DPI awareness context is set to
match the DPI awareness context of the given |
EnterDpiScope(DpiAwarenessContext)
Enters a scope during which the current thread's DPI awareness context is set to
awareness
.
public:
static IDisposable ^ EnterDpiScope(Microsoft::VisualStudio::Utilities::DpiAwarenessContext awareness);
public static IDisposable EnterDpiScope (Microsoft.VisualStudio.Utilities.DpiAwarenessContext awareness);
static member EnterDpiScope : Microsoft.VisualStudio.Utilities.DpiAwarenessContext -> IDisposable
Public Function EnterDpiScope (awareness As DpiAwarenessContext) As IDisposable
Parameters
- awareness
- DpiAwarenessContext
The new DPI awareness for the current thread.
Returns
An object that, when disposed, will reset the current thread's DPI awareness to the value it had when the object was created.
Applies to
EnterDpiScope(IntPtr)
Enters a scope during which the current thread's DPI awareness context is set to
match the DPI awareness context of the given hwnd
.
public:
static IDisposable ^ EnterDpiScope(IntPtr hwnd);
public static IDisposable EnterDpiScope (IntPtr hwnd);
static member EnterDpiScope : nativeint -> IDisposable
Public Function EnterDpiScope (hwnd As IntPtr) As IDisposable
Parameters
- hwnd
-
IntPtr
nativeint
The window whose DPI awareness to match.
Returns
An object that, when disposed, will reset the current thread's DPI awareness to the value it had when the object was created.