Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Public ActiveFormsMap As B4XSet
End Sub
Sub AppStart (Form1 As Form, Args() As String)
ActiveFormsMap = B4XCollections.CreateSet
MainForm = Form1
MainForm.RootPane.LoadLayout("1")
ShowForm(MainForm)
End Sub
Sub MainForm_Closed
FormClosed(MainForm)
End Sub
Public Sub ShowForm(frm As Form)
ActiveFormsMap.Add(frm)
frm.Show
End Sub
Public Sub FormClosed(frm As Form)
ActiveFormsMap.Remove(frm)
End Sub