Our application uses a common base form from which all forms should have been inherited. I would like to get rid of it for a number of reasons, ranging from the need for the police, so that everyone uses it for several troubles associated with the implementation of Delphi VFI. It turns out that the bulk of the proposed functions can be performed in other, more reliable ways.
The one I'm not very sure about automatically positions all forms in the center of its subscribers. Therefore, if I open Dialog A from my main form, it should be placed above the center of the main form. And if I then open Dialog B from dialog A, it should be placed above the center of dialog A, etc.
We took care of all this by setting the base property of Position position in poOwnerFormCenter, and it did a great job. But how to do this for the entire application?
I thought about using Screen.OnActiveFormChange, but I think this happens every time the form gets focus. I also thought about using Application.OnModalBegin, but there seems to be no obvious way to find the form in the place it is called.
Has anyone tried this?
source
share