Mdi_State - DfBaseDialog

Used to find out if a given object is a MDI child window

Type: Property

Access: Read/Write

Data Type: Boolean

Parameters: None

Syntax
 Property Boolean Mdi_State

Read Access: Get Mdi_State to BooleanVariable
Write Access: Set Mdi_State to BooleanVariable/Value


Description

This property can be used to find out if a given object is a MDI child window.

Sample

If you add the following code to a dbForm object and execute it the result will be the object id of the view.

Function ViewObject Handle hoLevel Returns Handle
    Boolean bMdi
    Handle hoView
    
    Get Parent Of hoLevel To hoLevel
    If (hoLevel > Desktop) Begin
        Get Mdi_State Of hoLevel To bMdi
        If (Not (bMdi)) Begin
            Get ViewObject hoLevel To hoView
        End
        Else Begin
            Function_Return hoLevel
        End
    End
    
    Function_Return hoView
End_Function

Call this function with SELF as the parameter. For example as in:

Get ViewObject Self To hoView

If the dbView's MDI_State is set to False, the next level where the MDI_State is set to true will be returned.