The following constants can be used anywhere in your code in place of the actual values:
The user chose the Close command from the Control menu on the form.
The Unload statement is invoked from code.
The current Microsoft Windows operating environment session is ending.
The Windows Task Manager is closing the application.