Window.Height Property

Project Developer Reference

Returns or sets the height of a project window in points. Read/write Long.

Syntax

expression.Height

expression   A variable that represents a Window object.

Return Value
Long

Remarks
A window changes its height by moving its bottom edge, leaving the top edge unaffected.

Example
The following example places the main window in the lower half of the screen.

Visual Basic for Applications
  Sub PlaceProjectInLowerScreenHalf()
Dim WindowWidth As Double
    
Application.WindowState = pjMaximized
WindowWidth = Application.Width        'Remember the width when maximized.
    
Application.<strong class="bterm">Height</strong> = Application.<strong class="bterm">Height</strong> / 2
Application.Top = Application.<strong class="bterm">Height</strong>

 'Ensure that the window uses all the available width.
If Application.Width &lt; WindowWidth Then
    Application.Width = WindowWidth
    Application.Left = 0
End If

End Sub

See Also