WPS 基础接口 > 文字 API 参考 > Application > 属性 > Application.UsableWidth 属性
返回 WPS 文档窗口可设置的最大宽度(以磅为单位)。Long 类型,只读。

语法

表达式.UsableWidth

表达式   一个代表 Application 对象的变量。

示例

本示例将活动文档窗口的尺寸设置为屏幕最大区域的四分之一。

示例代码
let Win = ActiveDocument.ActiveWindow
Win.WindowState = wdWindowStateNormal
Win.Top = 5
Win.Left = 5
Win.Height = (Application.UsableHeight*0.5)
Win.Width = (Application.UsableWidth*0.5)

本示例显示活动文档窗口中工作区的大小。

示例代码
let Win = ActiveDocument.ActiveWindow
MsgBox("Working area height = " + Win.UsableHeight + "\n" + "Working area width = " + Win.UsableWidth)

use all available width


请参阅