Visio (的 Window.ShowRulers 屬性)

判斷繪圖視窗中是否要顯示尺規。 讀取/寫入。

語法

expressionShowRulers

表達 代表 Window 物件的變數。

傳回值

整數

註解

設定 ShowRulers 屬性相當於選取 [檢視] 索引標籤上 [顯示/隱藏] 群組中的 [尺規]

範例

下列的 Microsoft Visual Basic for Applications (VBA) 巨集會示範如何使用 ShowRulers 屬性切換尺規的顯示。

 
Public Sub ShowRulers_Example() 
 
 'Check whether the active window is a drawing window. 
 If ActiveWindow.Type = visDrawing Then 
 
 'Switch the rulers on or off. 
 ActiveWindow.ShowRulers = Not ActiveWindow.ShowRulers 
 
 Else 
 
 'Tell the user why you are not switching the rulers. 
 MsgBox "Active window is not a drawing window.", _ 
 vbOKOnly, "Show/Hide Rulers" 
 
 End If 
 
End Sub

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應