Arrange Method [Visio 2003 SDK Documentation]
Arranges the windows in a Windows collection.
object**.Arrange**(nArrangeFlags)
object Required. An expression that returns a Windows collection.
nArrangeFlags Optional Variant. A flag that specifies how to arrange the windows; by default, the windows are arranged vertically.
Version added
2.0
Remarks
Using the Arrange method is equivalent to clicking Tile on the Window menu. The active window remains active.
Visio considers windows from top to bottom and then from left to right. You can influence which windows will end up topmost when tiling horizontally (or leftmost when tiling vertically) by prearranging windows.
The following constants declared by the Visio type library are valid values for nArrangeFlags. These constants are also declared by the Visio type library in VisWindowArrange.
Constant | Value |
---|---|
VisArrangeTileVertical |
1 |
VisArrangeTileHorizontal |
2 |
VisArrangeCascade |
3 |
Example
The following macro shows how to activate and arrange windows.
Public Sub Arrange_Example()
Dim vsoDocument As Visio.Document
Dim vsoWindow As Visio.Window
Dim vsoWindow2 As Visio.Window
'Create two new windows by adding documents.
Set vsoDocument = Documents.Add("")
Set vsoWindow = ActiveWindow
Set vsoDocument = Documents.Add("")
'Use the Arrange method to tile the windows
'(currently the last opened window is active).
Windows.Arrange
'Use the Activate method to make the other
'window the active window.
vsoWindow.Activate
End Sub
Applies to | Windows collection
See Also | SetWindowRect method