I found the way. First it requires the program to run on a separate thread from the user interface. Then use a AutoResetEvent lets say we call it RoadBlock
Afterthe controller shows the form then the programstops for RoadBlock.WaitOne.
When the form is finished and ready to return control to the program then weRoadBlock.Set in the form.
The hardest part is keeping the threads straight.