ApplicationName$() function - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
ft:locale
en-US
Product name
MapBasic
ft:title
MapInfo MapBasic Reference
First publish date
1985
ft:lastEdition
2023-09-12
ft:lastPublication
2023-09-12T16:32:32.686000

Purpose

Returns a string containing the name of the current MapBasic application that is running. You can call this function from the MapBasic window in MapInfo Pro.

Syntax

ApplicationName$()

Return Value

String expression representing the name of the MapBasic program.

Description

By calling the ApplicationName$() function from within a compiled MapBasic application, you can determine the name of the running application. If no application is running (if you call the function by typing into the MapBasic window), then ApplicationName$() returns an empty string.

To determine the path from which the current MapBasic application is executing call the ApplicationDirectory$() function.

Example

Dim sAppName As String 
sAppName = ApplicationName$() 
' At this point, sAppName might look like this: 
' 
' "Test.MBX"

See Also:

ApplicationDirectory$() function