When opening a window in seperate process you will are not able to close the window using the CLOSE WINDOW command.
Instead you must track the ID of the process that the window was opened in. Using the 4D command CALL PROCESS you can generate the form event nstead you must track the ID of the process that the window was opened in. CALL PROCESS will generate a form event On Outside Call. Use the 4D command CANCEL on the form to close the window.
The following code will create a new process calling the method openForm that opens a new window.
$procID:=New process("openForm";1024*1024)
Using the CALL PROCESS command will result in the form event occuring in the form opened by openForm.
CALL PROCESS($procID)
To close the window use the CANCEL command.
Case of
:(Form Event=On Outside Call)
CANCEL
End case