将形状或选定形状置于 z-顺序的顶层。
语法
表达式。BringToFront
表达 一个代表 Selection 对象的变量。
返回值
无
示例
以下宏显示如何在页面上将形状置于 z-顺序的顶层。
Public Sub BringToFront_Example() 
 
 Dim vsoShape1 As Visio.Shape 
 Dim vsoShape2 As Visio.Shape 
 Dim vsoShape3 As Visio.Shape 
 
 'Draw three rectangles. 
 Set vsoShape1 = ActivePage.DrawRectangle(1, 1, 4, 4) 
 vsoShape1.Text = "1" 
 Set vsoShape2 = ActivePage.DrawRectangle(2, 2, 5, 5) 
 vsoShape2.Text = "2" 
 Set vsoShape3 = ActivePage.DrawRectangle(3, 3, 6, 6) 
 vsoShape3.Text = "3" 
 
 'Bring vsoShape1 to the front of the z-order. 
 vsoShape1.BringToFront 
 
End Sub
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。