isBackgroundFormLoaded
Description
Returns whether the specified background Form is currently loaded in memory.
Even when the Form is hidden (hideBackgroundForm), this returns true as long as it is loaded.
Parameters
| Parameter | Type | Description |
|---|---|---|
| formPath | String | Path of the Form to check |
Returns
| Type | Description |
|---|---|
| bool | true if loaded, false if it is not loaded or has been closed |
Notes
- Visibility does not matter — a hidden Form still returns
true. - To check visibility as well, use
isBackgroundFormVisible().
Example
// Check whether the form is loaded, then open it conditionally
if (!$app.isBackgroundFormLoaded("alarm/watcher")) {
$app.openBackgroundForm("alarm/watcher", null, null);
} else {
$app.showBackgroundForm("alarm/watcher");
}
Related
$app.isBackgroundFormVisible(formPath)— Check whether the Form is both loaded and visible$app.openBackgroundForm(formPath, linkArg, callback)— Load and open a Form$app.closeBackgroundForm(formPath, result)— Close a Form and free its memory