Maybe I'm missing something pretty obvious, but I can't figure out how to show an instantiated form multiple times. In normal Delphi, once a form is created, I can hide and show it multiple times.
- I understand Application.CreateForm() in the DPR only works on the main form. All further calls to Application.CreateForm() don't do anything, read, the forms remain uninstantiated. So all forms but the main form HAVE TO be created dynamically once they are used the first time. Did I get that right?
- So at a certain point I create Form1 and show it within a HTML container using FormClass.CreateNew and an associated HTML ElementID. Form1 is showing fine at the desired position within the main form. Perfect.
- In order to make Form1 disappear at a later point, I tried Form1.Hide. But the Pas2JS compiler says it does not exist. So I use Form1.Close and realize that Form1 visually disappears and still remains instantiated.
- I CreateNew Form2, associated with the same ElementID. Form2 is also showing fine.
- Now I want to show Form1 again, together with the data the user already entered into the edits. So I close Form2 and ... now what? Form1.Show or Form1.ShowModal don't seem to work.
What to do to show Form1 again?
Many thanks, kind regards, Walter