Win32Interop.GetMonitorFromDisplayId(DisplayId) 方法

Reference

Definition

命名空间: Microsoft.UI

获取与指定 displayId 对应的显示器句柄,如果提供的 displayId 是有效的,并且系统有一个表示显示器的元素 HMONITOR

public static IntPtr GetMonitorFromDisplayId(DisplayId displayId);

Parameters

displayId DisplayId

显示的标识符。

Returns

IntPtr

提供的 displayId 是有效的,并且系统具有表示显示监视器的组件时,则与指定的 displayId 对应的显示监视器句柄。 否则为 null

适用于

Product 已引入的版本
WinUI 3 Windows 应用 SDK 1.0

另请参阅