EndHandler procedure - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

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