[Lazarus] fsStayOnTop under windows

Luca Olivetti luca at wetron.es
Wed Jan 28 21:42:18 CET 2009


En/na Henry Vermaak ha escrit:

>> Very funny, but it's not the case at hand: I just need the windows of my
>> application to always stay on top to the windows of another application.
>> I can do it in delphi and lazarus/qt, I just need a hack to do the same
>> under win32.
> 
> so what happens if the other application wants to be on top of yours?

The other application never wants to be on top of mine. Really.

Now I found that SetWindowPos HWND_TOPMOST actually works, but its 
effect is undone by the LCL.
I tried to call it in a timer every 100ms (yuck, the brute-force 
approach) but the application (not unsurprisingly) froze.
I tried to call it in the Deactivate handler (both the main form and the 
other forms and it has no effect.
I tried to set a timer on the Deactivate handler to fire SetWindowPos 
100ms later and it works....but only once.

Maybe I'll just have to remove the calls to "RemoveStayOnTopFlags" in 
win32callback.inc and see what happens.

Bye
-- 
Luca



More information about the Lazarus mailing list