*----Rlwinds.prg : Release all windows
Jeff,
I was going crazy trying to get forms to close, especially after an error occurred. The breakthrough came when I started treating them as windows. The following code has been very effective in releasing all open forms.
** PROCEDURE DESTROY ALL SCREENS
_screen.lockscreen= .t.
Show window all
LOCAL i, LCwindow
FOR i= 1 to _screen.formcount
LCwindow= wontop()
IF !empty(LCwindow)
Rele window (LCwindow)
ENDIF
ENDFOR
_screen.lockscreen= .f.