1
votes

If a Modal form creates a form and does .Show, how can the parent later determine if the non-modal form is still open or if the user closed it?

3

3 Answers

0
votes

Let the child form notify the parent when it closes. The parent form could use the TForm.OnClose event of the child form to let itself inform when the child form closes.

4
votes

When you close a form, it calls Hide, which sets Visible to false. Try checking the Visible property.

0
votes

All VCL components are tied into their parents with AddComponent and RemoveComponent notifications. If your form is set to Action = caFree in OnClose then it will free itself when the user (or you) closes it. This already notifies its parent and you can override the notification receipt in the parent to get this event. Bri