Here is the deal. Main form set to fsNormal
. This main form is maximized full screen with a floating toolbar. Toolbar is normal form with style set to fsStayOnTop
.
Most fo the time this works as expected. The mainform displays and the toolbar floats over on top of it.
Sometimes (this is a bugger to find a reproducible set of steps) when alt-tabbing to and from other apps (or when clicking the Delphi app icon on the taskbar) the following symptoms can happen:
When alt-tabbing away from the Delphi app the floating topmost
fsStayOnTop
form stays on top of the other apps. So if I alt-tab to Firefox then the floating menu stays on top of Firefox too.When alt-tabbing from another app to the Delphi app the floating menu is not visible (as it is behind the
fsNormal
mainform).
Is this a known bug or are there any hacks to force it to work? This also seems to happen most when multiple copies of the app are running (they have no interaction between them and should be running in their own windows "sandbox").
It is as if Delphi gets confused which window is meant to be on top and swaps them or changes the floating form to stayontopofeverything mode.
Or have I misunderstood fsStayOnTop
? I am assuming setting a form style to fsStayOnTop
makes it stay on top of all other forms within the current app and not all windows across other running apps.