R:BASE provides functions to assist in using modeless windows.
(IFWINDOW('windowname'))
Returns 1 if a form with the windowname is open, 0 if not. Windowname is the name given to the instance of an MDI form started with the "AS alias" option when using the ENTER, EDIT USING, or BROWSE USING commands.
(CVAL('MDI'))
Returns the value of the MDI operating condition (ON/OFF).