Delphi fsstayontop oddity

Posted by TallGuy on Stack Overflow See other posts from Stack Overflow or by TallGuy
Published on 2010-03-17T08:19:00Z Indexed on 2010/03/17 8:21 UTC
Read the original article Hit count: 247

Filed under:

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 reproducable 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...

  1. 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.

  2. When alt-tabbing from another app to the delphi app the flaoting menu is not visible (as it is behhind the fsnormal mainform).

Is there a known bug or any hacks to force it to work? This also seems to happen most when mutliple 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.

Thanks for any tips or workarounds.

© Stack Overflow or respective owner

Related posts about delphi