Sub showForm(layout As String,event As String,Title As String,width As Int ,height As Int)
Dim frmshowing As Boolean=False
Dim frm As Form = GetCurrentForm
If frm.IsInitialized Then
Log("GetCurrentForm "&frm.Title)' the second form is open but get mainform title
If frm.Title=Title Then
Log("form is open")
frmshowing=True
Else
Log("form is not open")
frmshowing=False
End If
End If
If frmshowing = False Then
Dim FMF As Form
FMF.Initialize(event, width, height)
FMF.RootPane.LoadLayout(layout)
FMF.Title = Title
FMF.Show
End If