OK...if I recall, Toolbars are added to the _SCREEN.Forms collection and they don't have a Release method or a QueryUnload, so don't you have to trap for the existence of those methods first in this code?
>>How would I release all the opened forms after quiting or selecting the EXIT bar from the system menu.
>
>Like Nick said, you can step through the _screen.forms collection. I suggest putting that code in an exitapp routine that gets fired by your Menu, and in an ON SHUTDOWN (ON SHUTDOWN is how clicking the "X" in the main VFP Screen gets trapped).
>
>I would also add a little code to test to see if each form can be closed:
>
>
local llAbort
>for lnI = _screen.FormCount to 1 step -1
> if _screen.Forms[lnI].QueryUnload()
> _screen.Forms[lnI].Release()
> else
> llAbort = .T.
> exit
> endif
>endfor
>Then test llAbort to see if you can finish shutting down.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05