元编程参考文档

显示器信息

13 个节点

本页内容 13

显示器信息

函数

One monitor: where it sits on the virtual desktop, and at what scale.

签名
显示器信息 -> Display Info
    名称: 文本
    边界: Screen Rectangle
    工作区域: Screen Rectangle
    主显示器: 真否
    每英寸点数: 整数
DisplayInfo DisplayInfo(
    string Name,
    ScreenRectangle Bounds,
    ScreenRectangle WorkingArea,
    bool IsPrimary,
    int DotsPerInch)

参数

名称类型默认值说明
名称文本—The platform's name for the device, for a caller that wants to show a list.
边界Screen Rectangle—The whole monitor, in virtual-desktop pixels.
工作区域Screen Rectangle—What is left after the taskbar or dock. Equal to Bounds where the platform does not report one.
主显示器真否—The one whose top-left corner is the origin.
每英寸点数整数—The monitor's effective DPI, 96 meaning unscaled. This is the number a caller needs to convert between a coordinate it computed from a screenshot and a coordinate this package will accept - see the coordinate-space section of the package README, because the answer differs per platform.

返回

显示器信息Display Info
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
显示器信息
所属包
桌面自动化

分解

函数

此节点没有文档说明。

签名
分解(Display Info: Display Info) -> (名称: 文本, 边界: Screen Rectangle, 工作区域: Screen Rectangle, 主显示器: 真否, 每英寸点数: 整数)
void Deconstruct(
    DisplayInfo Display Info,
    out string Name,
    out ScreenRectangle Bounds,
    out ScreenRectangle WorkingArea,
    out bool IsPrimary,
    out int DotsPerInch)

参数

名称类型默认值说明
Display InfoDisplay Info—

返回

名称文本
边界Screen Rectangle
工作区域Screen Rectangle
主显示器真否
每英寸点数整数
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
显示器信息
所属包
桌面自动化

相等

函数

此节点没有文档说明。

重载 1/2

签名
相等(Display Info: Display Info, 对象: 任意) -> 真否
bool Equals(DisplayInfo Display Info, object obj)

参数

名称类型默认值说明
Display InfoDisplay Info—
对象任意—

返回

结果真否

重载 2/2

签名
相等(Display Info: Display Info, 另一个: Display Info) -> 真否
bool Equals(DisplayInfo Display Info, DisplayInfo other)

参数

名称类型默认值说明
Display InfoDisplay Info—
另一个Display Info—

返回

结果真否
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
显示器信息
所属包
桌面自动化

边界

函数

The whole monitor, in virtual-desktop pixels.

签名
边界(Display Info: Display Info) -> Screen Rectangle
ScreenRectangle Bounds(DisplayInfo Display Info)

参数

名称类型默认值说明
Display InfoDisplay Info—

返回

结果Screen Rectangle
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
显示器信息
所属包
桌面自动化

每英寸点数

函数

The monitor's effective DPI, 96 meaning unscaled. This is the number a caller needs to convert
between a coordinate it computed from a screenshot and a coordinate this package will accept -
see the coordinate-space section of the package README, because the answer differs per platform.

签名
每英寸点数(Display Info: Display Info) -> 整数
int DotsPerInch(DisplayInfo Display Info)

参数

名称类型默认值说明
Display InfoDisplay Info—

返回

结果整数
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
显示器信息
所属包
桌面自动化

是否为主显示器

函数

The one whose top-left corner is the origin.

签名
是否为主显示器(Display Info: Display Info) -> 真否
bool IsPrimary(DisplayInfo Display Info)

参数

名称类型默认值说明
Display InfoDisplay Info—

返回

结果真否
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
显示器信息
所属包
桌面自动化

名称

函数

The platform's name for the device, for a caller that wants to show a list.

签名
名称(Display Info: Display Info) -> 文本
string Name(DisplayInfo Display Info)

参数

名称类型默认值说明
Display InfoDisplay Info—

返回

结果文本
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
显示器信息
所属包
桌面自动化

缩放比例

函数

96 DPI is 1.0; a monitor at 150% reports 1.5.

签名
缩放比例(Display Info: Display Info) -> 数字
double ScaleFactor(DisplayInfo Display Info)

参数

名称类型默认值说明
Display InfoDisplay Info—

返回

结果数字
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
显示器信息
所属包
桌面自动化

工作区域

函数

What is left after the taskbar or dock. Equal to Bounds where the platform does not report one.

签名
工作区域(Display Info: Display Info) -> Screen Rectangle
ScreenRectangle WorkingArea(DisplayInfo Display Info)

参数

名称类型默认值说明
Display InfoDisplay Info—

返回

结果Screen Rectangle
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
显示器信息
所属包
桌面自动化

获取哈希码

函数

此节点没有文档说明。

签名
获取哈希码(Display Info: Display Info) -> 整数
int GetHashCode(DisplayInfo Display Info)

参数

名称类型默认值说明
Display InfoDisplay Info—

返回

结果整数
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
显示器信息
所属包
桌面自动化

转为文本

函数

此节点没有文档说明。

签名
转为文本(Display Info: Display Info) -> 文本
string ToString(DisplayInfo Display Info)

参数

名称类型默认值说明
Display InfoDisplay Info—

返回

结果文本
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
事件 例程 状态机状态
声明于
显示器信息
所属包
桌面自动化

相等运算

函数

此节点没有文档说明。

签名
相等运算(左侧: Display Info, 右侧: Display Info) -> 真否
bool op_Equality(DisplayInfo left, DisplayInfo right)

参数

名称类型默认值说明
左侧Display Info—
右侧Display Info—

返回

结果真否
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
显示器信息
所属包
桌面自动化

不等运算

函数

此节点没有文档说明。

签名
不等运算(左侧: Display Info, 右侧: Display Info) -> 真否
bool op_Inequality(DisplayInfo left, DisplayInfo right)

参数

名称类型默认值说明
左侧Display Info—
右侧Display Info—

返回

结果真否
所属发行版
元编程(教育版)元编程(专业版)
可用的图种类
数据流 函数 事件 例程 蓝图 状态机状态
声明于
显示器信息
所属包
桌面自动化