I want to save some data when a form is closed or the application terminates. I put a call to my save data method inside the close event sub yet it doesnt seem to get executed when I call application.exit.