*Form1's launch of Form2:
this.lWaitingOnForm2 = .t.
DO FORM Form2 WITH this
DO WHILE this.WaitingOnForm2
DOEVENTS
ENDDO
*Form2's Init; I've assumed you would add a property to hold
* the form reference passed by the caller
LPARAMETER toParent
this.oParentForm = toParent && save object reference if passed
*Form2's Release
IF TYPE('this.oParentForm.lWaitingOnForm2') = 'L'
this.oParentForm.lWaitingOnForm2 = .f. && update object if ref saved and property exists
ENDIF
this.oParentForm = .F.
Be aware that this results in a tight coupling of Form1 and Form2; as a result, any form that uses Form2 will need to have an lWaitingOnForm2 property added to it to provide the semaphoring mechanism. Modal operation will be more portable, and would allow you to explicitly return a value if needed without having to pass the form reference.EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater
NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC
The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys