base:CloseDisplay()
Posted: Wed Apr 15, 2015 11:16 pm
I use this all the time instead of using the internal CloseDisplay() function.
This will return whether or not the when has been closed successfully.
This will return whether or not the when has been closed successfully.
Code: Select all
Global base
base = {}
Function base:CloseDisplay(window)
ExitOnError(False)
If GetAttribute(#DISPLAY, window, #ATTRSTATE) = #DISPSTATE_OPEN
Local err
If GetAttribute(#DISPLAY,window,#ATTRSTATE) <> #DISPSTATE_CLOSED
Err = False
CloseDisplay(window)
Else
Err = True
EndIf
EndIf
ExitOnError(True)
Return (err)
EndFunction