PROCEDURE Init This.AddToFormsCollection ENDPROC PROCEDURE Destroy This.RemoveFromFormsCollection ENDPROC * ** Add to Forms Collection (inorder to stay alive) * PROCEDURE AddToFormsCollection IF TYPE("_screen.FormsCollection") = 'O' _screen.FormsCollection.Add(THIS) ENDIF ENDPROC * ** Remove from Forms Collection (inorder to be allowed to die) * PROCEDURE RemoveFromFormsCollection LOCAL lIndex FOR lIndex = 1 TO _Screen.FormsCollection.Count IF _Screen.FormsCollection.Item(lIndex) = THIS _Screen.FormsCollection.Remove(lIndex) EXIT ENDIF ENDFOR ENDPROC