Home > Language Reference > Special Identifiers

App Identifier

Instance of the running application.

Remarks

The App identifier is an implicitly declared global variable accessible from anywhere in your program that contains an instance of the main class of your application.

The main class of an application is the class in your project derived from the Application class and where you implement the event handlers that respond to the different ways of launching the application. Refer to the Programmer's Guide for further information on the structure of an HB++ application.

This identifier is useful for accessing characteristics of the application such as its version, title, or for interacting with the system, for example setting an alarm, saving information in preferences etc. Refer to the Application class for more information.

The following example displays the application version in a dialog box:

Private Sub Button1_Click()
  MsgBox App.Version
End Sub

Although it is possible to affect a new value of this variable, this practice is not advised. For example:

Set App = Nothing ' Allowed, but will rapidly cause a fatal error

System requirements

SystemMinimal versionRemarks
Palm OSPalm OS 3.0N/A