Aracılığıyla paylaş


DpiAwareness.EnterDpiScope Method

Definition

Overloads

EnterDpiScope(DpiAwarenessContext)

Enters a scope during which the current thread's DPI awareness context is set to awareness.

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.

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.

Applies to