共用方式為


Selection.BringToFront 方法 (Visio)

會依 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 支援與意見反應