Skip to content

Latest commit

 

History

History
64 lines (40 loc) · 1.59 KB

Project.Application.AppSize.md

File metadata and controls

64 lines (40 loc) · 1.59 KB
title keywords f1_keywords ms.service api_name ms.assetid ms.date ms.localizationpriority
Application.AppSize method (Project)
vbapj.chm2012
vbapj.chm2012
project-server
Project.Application.AppSize
31183106-d66d-235d-608c-02d3844c0e1b
06/08/2017
medium

Application.AppSize method (Project)

Sets the width and height of the main window.

Syntax

expression. AppSize( _Width_, _Height_, _Points_ )

expression A variable that represents an Application object.

Parameters

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.

Return value

Boolean

Example

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]