Windows.Arrange 方法 (Visio)
在 Windows 集合中排列 窗口 。
语法
expression。 Arrange
( _nArrangeFlags_
)
表达 一个代表 Windows 对象的变量。
参数
名称 | 必需/可选 | 数据类型 | 说明 |
---|---|---|---|
nArrangeFlags | 可选 | Variant | 用于指定如何排列窗口的标志;默认情况下,垂直排列窗口。 |
返回值
Nothing
注解
使用 Arrange 方法等效于单击“视图”选项卡上的“窗口”组中的“全部重排”。活动窗口始终处于活动状态。
Visio 考虑从上到下,然后从左到右的窗口。 通过预先排列窗口可在水平平铺时影响置于最顶部的窗口(垂直平铺时影响置于最左侧的窗口)。
Visio 类型库声明的以下常量是 nArrangeFlags 的有效值。 这些常量也由 VisWindowArrange 中的 Visio 类型库声明。
常量 | 值 |
---|---|
VisArrangeTileVertical | 1 |
VisArrangeTileHorizontal | 2 |
VisArrangeCascade | 3 |
示例
下面的宏说明如何激活和排列窗口。
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
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。