EnableRestrictToContainer example for Visual Basic
'This examples toggles the "restrict to container" property.
'If an object is restricted to the container, no part of it can be moved outside the container
Private Sub ExampleAnnRestrictToContainer(hObject As Long)
Dim bRestrict As Boolean
bRestrict = RasterAnn.EnableRestrictToContainer(hObject)
bRestrict = Not bRestrict
RasterAnn.EnableRestrictToContainer(hObject) = bRestrict
If bRestrict = True Then
MsgBox "Restricted To Container"
Else
MsgBox "Not Restricted To Container"
End If
End Sub