Terminate Application statement - 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

Halts execution of a running or sleeping MapBasic application. You can issue this statement from the MapBasic window in MapInfo Pro.

Syntax

Terminate Application app_name 

app_name is a string representing the name of the running application (for example, SCALEBAR.MBX).

Description

If a MapBasic program creates custom menu items or ButtonPad buttons, that MapBasic program can remain in memory, "sleeping," until the user exits MapInfo Pro. To force a sleeping application to halt, issue a Terminate Application statement. For example, if you need to halt an application for debugging purposes, you can issue the Terminate Application statement from the MapBasic window.

If your application launches another MapBasic application (using the Run Application statement), you can use the Terminate Application statement to halt the other MapBasic application.

Note: Terminate Application allows one program to halt another program. The easiest way for a program to halt itself is to issue an End Program statement.

See Also:

End Program statement, Run Application statement