AppSize Method
Sets the width and height of the main window.
Syntax
expression**.AppSize(Width, Height, Points)**
*expression * Optional. An expression that returns an Application object.
Width Optional Long. A number that specifies the new width of the main window.
Height Optional Long. A number that specifies the new height of the main window.
Points Optional Boolean. True if Width and Height are measured in points. False if they are measured in pixels. The default value is False.
Example
The following example moves the main window of Microsoft Office Project 2003 to the left half of the screen.
Sub MoveMainWindowToLeftHalf()
Dim WindowHeight As Long
' Remember the height when maximized.
Application.WindowState = pjMaximized
WindowHeight = Application.Height
AppSize Width:=UsableWidth / 2, Height:=UsableHeight, Points:=True
Application.Left = 0
' Make sure the window uses all the available height.
If Application.Height < WindowHeight Then Application.Height = WindowHeight
End Sub
Applies to | Application Object
See Also | AppExecute Method | AppMaximize Method | AppMinimize Method | AppMove Method | AppRestore Method