Ramil,
It's simplier to release all forms using Screen's Forms collection.
<pre>
FOR i=_SCREEN.FormCount TO 1 STEP -1
_SCREEN.Forms(i).Release()
ENDFOR
>Hi all,
>
>I am trying to close all modal forms based on the _screen.ActiveForm property. I noticed that if I use a do while loop as in the function ShutDownAll(), the form oF1 will not be released. However, using the timer event to process the ActiveForms will close all the forms properly.
>
>Copy and paste the code snippet and run it from VFP7. Make sure that you click on the command button of the first form immediately as the timer will fire in 3 seconds.
>
>The code as it is will close all forms. Uncomment the three lines of code in the timer event so produce improper behavior.
>
>Appreciate any feedback or comments. TIA.
>
--sb--