Skip to content

Latest commit

 

History

History
51 lines (32 loc) · 1.11 KB

Project.Project.Windows2.md

File metadata and controls

51 lines (32 loc) · 1.11 KB
title ms.service api_name ms.assetid ms.date ms.localizationpriority
Project.Windows2 property (Project)
project-server
Project.Project.Windows2
0f10c401-d09b-82db-60ed-0f2b03b82656
06/08/2017
medium

Project.Windows2 property (Project)

Gets a Windows2 collection representing the open windows in the project. Read-only Windows2.

Syntax

expression. Windows2

expression A variable that represents a Project object.

Remarks

The Windows2 property is recommended, in place of the Windows property, for all new development in VBA and external applications developed with the .NET Framework.

Example

The following example cascades all the open windows in the active project.

Sub CascadeWindows() 
 Dim I As Integer 
 
 ActiveWindow.WindowState = pjNormal ' Restore the window. 
 
 With ActiveProject.Windows2 
 For I = 1 To .Count 
 .Item(I).Activate 
 .Item(I).Top = (I - 1) * 15 
 .Item(I).Left = (I - 1) * 15 
 Next I 
 End With 
 
End Sub

[!includeSupport and feedback]