Window.Height 属性 (Project)

获取或设置项目窗口的高度(以磅为单位)。 可读/写 Long 类型。

语法

表达式高度

表达 一个代表 Window 对象的变量。

备注

窗口通过移动其底边缘更改高度,而上边缘保持不变。

示例

下面的示例将主窗口放在屏幕的下半部。

Sub PlaceProjectInLowerScreenHalf() 
 
 Dim WindowWidth As Double 
 
 Application.WindowState = pjMaximized 
 WindowWidth = Application.Width 'Remember the width when maximized. 
 
 Application.Height = Application.Height / 2 
 Application.Top = Application.Height 
 
 'Ensure that the window uses all the available width. 
 If Application.Width < WindowWidth Then 
 Application.Width = WindowWidth 
 Application.Left = 0 
 End If 
 
End Sub

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。