Hiding Forms when Exiting Applications
- Last UpdatedFeb 08, 2023
- 1 minute read
Previously, the main form was swapped when switching applications. Forms opened as children of the main form were hidden when switching out of an application.
Since the main form is no longer swapped when switching applications, this no longer occurs so !!appFormCntrl controls the hiding of forms. When switching between applications, if a form is shown as a child of the main form and is not registered to be shown in the new application, then it is hidden. (Descendants of this form will therefore also be hidden.)
Dockable forms are shown as free forms, so will be not be closed. However, the effect can still be achieved by registering the form in just one application with the argument !showOnSwitch set to false:
!visibleInApps[1] = 'APP'
!!appFormCntrl.registerForm(!form, !visibleInApps, ARRAY(), false, false)
The form will be hidden when switching from the application 'APP' and will not be shown next time the application is started.