> procedure ferme_fen
>
> LOCAL lnForm, lnFormToClose
> lnFormToClose = 1
> FOR lnForm = 1 TO _screen.FormCount
> IF TYPE("_screen.Forms(lnFormToClose)") == "O"
> _screen.activeform.release()
> ENDIF
> ENDFOR
In this procedure, you're not releasing all of the forms.
Yes, it looks liek you are, but they do take a second or to to actually
be released.
The chain of events is then something like
type("_screen.Forms(1)") = "O"
_screen.activeform.release() && releases _screen.Forms(1)
type("_screen.Forms(2)") = "O"
_screen.activeform.release() && form(1) hasn't finished being
released yet,
&& so it gets the release command
again. Form(2)
&& skips it.
Also, you should be traversing this array backwards, not forwards.