返回或设置一个
Single
类型值,该值代表文档、应用程序和幻灯片放映窗口的上边缘到应用程序窗口用户区域上边缘的距离(以磅为单位)。将该属性设为一个很大的正值或负值会将整个窗口移出桌面。可读/写。
语法
表达式.Top
表达式 一个代表 Application 对象的变量。
示例
以下示例水平排列第一个和第二个窗口。即每个窗口占据应用程序窗口用户区域的一半垂直可用空间和所有水平可用空间。要使以下示例执行,只能有两个打开的文档窗口。
示例代码 |
Windows.Arrange(ppArrangeTiled)
let sngHeight = Windows.Item(1).Height // available height
let sngWidth = Windows.Item(1).Width + Windows.Item(2).Width // available width
let w1 = Windows.Item(1)
w1.Width = sngWidth
w1.Height = sngHeight / 2
w1.Left = 0
let w2 = Windows.Item(2)
w2.Width = sngWidth
w2.Height = sngHeight / 2
w2.Top = sngHeight / 2
w2.Left = 0
|