ShowGrid Property [Visio 2003 SDK Documentation]
Determines whether a grid is shown in a window.
intRet = object**.ShowGrid**
object**.ShowGrid** = intExpression
intRet Integer. True (-1) if grids are showing; False (0) if grids are hidden.
object Required. An expression that returns a Window object.
intExpression Required Integer. True (non-zero) to show a grid; False (0) to hide a grid.
Version added
4.5
Remarks
Setting the ShowGrid property is equivalent to clicking Grid on the View menu.
Example
This Microsoft Visual Basic for Applications (VBA) macro shows how to use the ShowGrid property to hide the grid. To restore the grid after running this macro, set the ShowGrid property to True.
Public Sub ShowGrid_Example()
'Check whether current window is a drawing window.
If ActiveWindow.Type = visDrawing Then
'Hide the grid.
ActiveWindow.ShowGrid = False
Else
'Tell the user why you're not hiding the grid.
MsgBox "Current window is not a drawing window.", vbOKOnly, "Show Grid"
End If
End Sub
Applies to | Window object
See Also | ShowConnectPoints property | ShowGuides property | ShowPageBreaks property | ShowRulers property | ShowStatusBar property