... thisform.lWaitForSecondForm= .T. DO FORM MySecondTopLevelForm WITH thisform DO WHILE thisform.lWaitForSecondForm =INKEY(1,'H') ENDDO ....In the second form:
LPARAMETERS poFirstTopLevelForm thisform.oFirstTopLevelForm = poFirstTopLevelForm ...3. In Destroy method:
thisform.oFirstTopLevelForm.lWaitForSecondForm = .F.
...
This should cause the first to wait in the loop until the destroy event occurrs in the second form.