Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Screens/Forms Layouts
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00328406
Message ID:
00328622
Views:
20
>>>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."
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform