_Instance Variable, hInstance Property (App)

Purpose

Return the instance handle of the running program.

Syntax

Handle = _Instance

Handle = App.hInstance

Description

For 'interpreted' programs, the instance of the GFA-BASIC 32 IDE is returned. For a compiled program, the instance of the program is returned. Some Windows's API functions need this handle.

Example

Dim h As Handle

h = _INSTANCE : Print h

h = App.hInstance  : Print h

Remarks

Within GFA-BASIC 32 there are no interpreted programs, only compiled. However, when a program is run in the context of the IDE, the instance handle determines the GFA-BASIC 32 IDE.

See Also

App, PrevInstance

{Created by Sjouke Hamstra; Last updated: 21/12/2021 by James Gaite}