I'm afraid is not possible, sorry. If you need to avoid the use of certain operations, like form closing or button pressed in the middle of a process. I suggest you use the following techniques:
1) Use a private data member lWorking that becomes true when you are in the process.
2) Use a private data member lCloseRequested that any button may change it to true in the process loop.
3) Check on your loop the value of lCloseRequested, to exit from it if becomes true.
4) Disable all the controls you do not want the user can touch.
5) Reject the form closing using its OnClose event and checking if lWorking is true.