I have a project that requires that I run some code when the application closes. The application is only a single form that hides itself almost immediately after execution, so the only way it can be closed is by manually terminating it with the task manager.
If I use the onclose event, will it be called in this case? Also, can someone post a brief code example for setting up the onclose event?