Project (的 Window.Height 屬性)
會取得或設定專案視窗的高度 (以點為單位)。 可讀寫的 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 支援與意見反應。