While adding a secondary window (TForm) to a project written with Embarcadero C++Builder 10.4, I have the problem where that secondary window is always in front of the main one. That is, when clicking on the primary window, the secondary window loses focus but remains on top of the primary window.
I have tried changing the BorderStyle
property, the PopupMode
property, and I even tried to call the secondary window's SendToBack()
method when the primary window activates. Nothing changes.
The secondary window is created with a NULL
owner, and it is shown through it's Show()
method.
The question is simple: How can I make the active window (TForm) on top of the other windows (TForm)?
(Primary TForm should not be behind secondary TForm when primary is active.)