GefObject.Container (read-only property)

Gets the GefObject in which this GefObject is contained.
Syntax: Set GefObject = object.Container
Description: Returns Nothing for the GefObject representing the screen.

Note: This property is different from the Parent property. The Parent property of a GefObject is the GefObjects collection it is part of.


Sub GefObject_Container()
    Dim oCimObj As GefObject
    Dim oCimCntObj As GefObject
    Set oCimObj = CimGetObject
    Set oCimCntObj = oCimObj.Container
    If Not oCimCntObj Is Nothing Then
        oCimCntObj.Fill.ForeColor.RGB = &HBB&
        CimGetScreen.Refresh False
        MsgBox "The container object is now be red"
        MsgBox "The container property does not apply " & _
            "to this object"
    End If
End Sub