Reference
Definition
命名空间: Microsoft.UI
获取与指定 displayId 对应的显示器句柄,如果提供的 displayId 是有效的,并且系统有一个表示显示器的元素 HMONITOR。
public static IntPtr GetMonitorFromDisplayId(DisplayId displayId);
Parameters
displayId
DisplayId
显示的标识符。
Returns
如果提供的 displayId 有效且系统具有表示显示监视器的 HMONITOR,则获取与指定的 displayId 对应的显示监视器句柄。 否则为 null。
适用于
| Product | 已引入的版本 |
|---|---|
| WinUI | Windows 应用 SDK 1.0 |