Actually none of the suggested(OOP) methods will work. Looking at his attached project, the secondary forms are auto-created, which means:
- the owner is TApplication
- parent is nil
Which is, among other reasons, why I insisted that he needs to pass (and store) the caller through an "Execute" call (similar to what the common dialogs do). That is almost the only way to know unequivocally which form called, and more so if the code somehow "hides" any other method of showing the ... let's call it "dialog", whether Show, ShowModal or whatever else.
I had a similar problem, though for other reasons, with a common form of mine (basically an "About" dialog which also shows debugging info on demand, hence the problem), and the solution was almost exactly as I have outlined before.
Incidentaly, a terminology question: the form which the OP wants to know about is neither the owner or the parent; it's the
caller form. Talking about owners and parents kind of obscures the issue at hand. At least, if I understand the question correctly