I have just completed a tutorial called "The Never Ending Program". It allows you to hijack an application and every time the user tries to close it, a custom message box will pop up, and the app will not close.

http://thelegendofrandom.com/blog/archives/1347