title | keywords | f1_keywords | ms.service | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|---|
Application.AppSize method (Project) |
vbapj.chm2012 |
|
project-server |
|
31183106-d66d-235d-608c-02d3844c0e1b |
06/08/2017 |
medium |
Sets the width and height of the main window.
expression. AppSize
( _Width_
, _Height_
, _Points_
)
expression A variable that represents an Application object.
Name | Required/Optional | Data type | Description |
---|---|---|---|
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. |
Boolean
The following example moves the main window of Project 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
' Be sure the window uses all the available height.
If Application.Height < WindowHeight Then Application.Height = WindowHeight
End Sub
[!includeSupport and feedback]