>>I am opening several forms in my application. Right now, I'm not sure which one I'm closing, which one I'm hiding etc. Can anyone tell me the best method to ensure that I am opening and closing all my forms when I enter and exit them. Imagine my surprise when I look in the background after my program errors off and I still see a form that I KNOW I had a thisform.release() in the click event of the button on that form!
>>
>
>If you are using the native VFP window as your main window, you can play with the following:
>
>
>FOR i = _SCREEN.FORMCOUNT
> _SCREEN.FORMS[i].RELEASE()
>ENDFOR
>
>
This will fail in several different ways - some forms will get skipped over, and you'll iterate beyond the end of the list. If you use this logic, iterate downwards from _SCREEN.FORMCOUNT rather than up.