返回或设置一个
Double 值,它代表从窗口上边缘到使用区域(在菜单、任何停放在顶端的工具栏和编辑栏下方)上边缘的距离(以磅为单位)。
语法
表达式.Top
表达式 一个代表 Window 对象的变量。
说明
无法对最大化窗口设置此属性。使用 WindowState 属性可返回或设置窗口的状态。
示例
本示例水平排列第一个窗口和第二个窗口,也就是说,每个窗口占用可用的垂直空间的一半,占用应用程序窗口的工作区域的所有水平空间。若要运行该示例,必须只打开两个工作表窗口。
示例代码 |
Windows.Arrange(-4128)
let ah = Windows.Item(1).Height // available height
let aw = Windows.Item(1).Width + Windows.Item(2).Width // available width
let wintop1 = Windows.Item(1)
wintop1.Width = aw
wintop1.Height = ah / 2
wintop1.Left = 0
let wintop2 = Windows.Item(2)
wintop2.Width = aw
wintop2.Height = ah / 2
wintop2.Top = ah / 2
wintop2.Left = 0
|