>>>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.
Yes. I was forced to see the module 'exitproc' that we are using and found out that aside from what you've said, we did not use _SCREEN.FORMS[i].RELEASE.
We have this instead:
cCurrentWindow = _SCREEN.FORMS[i].NAME
RELEASE WINDOW (cCurrentWindow)
because using THISFORM.RELEASE OR _SCREEN.FORMS[i].RELEASE does not fire QUERYUNLOAD event which is important one on our Framework. :)
JESS S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net
CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."