Hi,
If I had to do this then I would use ACCEPT.
In my main window I would do :
ThreadNo = Start(MyComProcess)
To stop it I would do on a button :
Post(Event:closeWindow,,ThreadNo)
and in myComProcess I would have :
WindowWait WINDOW('Caption'),AT(-1,-1,0,0),GRAY,Timer(100)
END...