To answer this question, I created an IDE form with two buttons. The first button runs TheView.Cancel when clicked, while the second button runs TheView.RunTerminate when clicked. Then, in the Form Properties, TheView_EventTerminate runs MsgBox "I'm Done".
With the form running, a click on the first button displays the message and closes the form (which is equivalent to clicking the "X" icon or the File > Close menu entry), while a click on the second button displays the message and leaves the form running. And, if you run the form with the read-only switch off, the stop button will display the message and leave the form in edit mode.
So, all of these actions perform TheView_EventTerminate, which you can use for cleanup conditions. But, TheView.RunTerminate will not exit the form or stop it from running, while TheView.Cancel will exit.