Skip to content

Latest commit

 

History

History
46 lines (30 loc) · 1.56 KB

File metadata and controls

46 lines (30 loc) · 1.56 KB
title Win32Interop.GetMonitorFromDisplayId(DisplayId) method
description Gets the display monitor handle that corresponds to the specified *displayId*, if the provided *displayId* is valid and the system has an `HMONITOR` that represents the display monitor.
ms.topic article
ms.date 02/08/2022
keywords windows 10, windows 11, Windows App SDK, desktop development, winui, app sdk, C#, interop, Win32Interop.GetDisplayIdFromMonitor, GetDisplayIdFromMonitor
ms.localizationpriority low

Win32Interop.GetMonitorFromDisplayId(DisplayId) method

Reference

Definition

Namespace: Microsoft.UI

Gets the display monitor handle that corresponds to the specified displayId, if the provided displayId is valid and the system has an HMONITOR that represents the display monitor.

public static IntPtr GetMonitorFromDisplayId(DisplayId displayId);

Parameters

displayId DisplayId

The identifier for the display.

Returns

IntPtr

The display monitor handle that corresponds to the specified displayId, if the provided displayId is valid and the system has an HMONITOR that represents the display monitor. Otherwise, null.

Applies to

Product Introduced in
WinUI Windows App SDK 1.0

See also