Purpose
A reserved procedure name, called automatically when an application terminates.
Syntax
Declare Sub EndHandler
Sub EndHandler
statement_list
End Sub
statement_list is a list of statements to execute when the application terminates.
Description
EndHandler is a special-purpose MapBasic procedure name.
If the user runs an application containing a sub procedure named EndHandler, the EndHandler procedure is called automatically when the application ends. This happens whether the user exited MapInfo Pro or another procedure in the application issued an End Program statement.
Note: Multiple MapBasic applications can be "sleeping" at the same time. When MapInfo Pro terminates, MapBasic automatically calls all sleeping EndHandler procedures, one after another.
See Also:
RemoteMsgHandler procedure, SelChangedHandler procedure, ToolHandler procedure, WinChangedHandler procedure, WinClosedHandler procedure