I am having more difficulty with "stopping" the app. As I mentioned, I do have the SYSTEM form modal and returning a value. I do have the PRG trapping the return and attempting to"
if vAbort=.T. then
clear event
quit
endif
I also call the SYSTEM form from MYINITIALFORM when a user wants to changes some system settings. It to traps the vAbort with:
if vAbort=.T. then
thisform.release
endif
The problem on this call is that the form is NOT releasing.. it is hitting that line and processing through it continuing on with the next line after the ENDIF, thus generating an error when it tries to do something with the missing system information. I know it is hitting the thisform.release because I have put a WAIT WINDOW in the if/endif loop to watch for it.
>-snip-
>>
>>This has been a problem most of the day. I originally put this in the MYINITIALFORM.LOAD but had problem with the aborting and grid references again. I really think it needs to be outside MYINITIALFORM but not sure quite where or how. In some other apps I have written, they open to a form that is a system menu. That makes things easier but this app is basically one form and doesn't need a menu for one single item.
>>
>>
>>Suggestions?
>
>How about this:
>
Make your system settings form modal, return a value in the Unload event that indicates if the user has populated the required fields.
>Call your system settings form from your initial form's Load event, capturing the return value to a property of the form: "do form mysystem to this.ok"
>In the Init event of the initial form, check the value of this.ok (returned from the system form) and return .f. if the returned value indicates that the system form was not populated. This will prevent the initial form from loading.
>
>Make sure you CLEAR EVENTS so that the app closes.
Peter Brama
West Pointe Enterprises
VFP is getting easier but STILL alot to learn!!