Back in BCB3 or BCB5, I seem to remember that there was a way to see why my app was closing. I would like to show a dialog box if the user closes it, but just gracefully close if the computer is rebooting. How can I know the reason for the shutdown of my app?