Another suggestion that might work...
Make the new form modeless, so the first form can complete the code and release itself. BUT in the Init of the second form put
this.windowtype = 1
i.e. let the form declare itself to be modal. It certainly does do this; you'll have to check that the first form goes away.
Regards
Mike
Regards
Mike