Mastodon
Programmierung

StayOnTop

Liang Liem wrote in message
news:
37660B6D.83D9E151@capelon.se…

Hi,

I have a delphi-application that always using one of two forms. The
application needs
to be on top of any other application that may exist on the screen.
I have tried to switch the FormStyle property to FStayOnTop on the form
that is currently
visible (and FStayOnTop off for the hidden form). However, it does not
work properly.
The delphi help also recommends to not change that property
during run-time.

Is there any other way to make a form stay on top on the screen ?

Regards
Liang Liem

Formular immer im Vordergrund anzeigen – auch nachträglich!
Stay on Top

[code lang=”delphi”]Try this:

Function ShowFormTop(Frm:TForm):Boolean ;
Begin
Result := SetWindowPos(Frm.Handle,HWND_TOPMOST,
Frm.Left,Frm.Top,Frm.Width,Frm.Height,
SWP_SHOWWINDOW);
Frm.Update ;
End;
[/code]
-Steve-

[tags]Delphi, Forms[/tags]

0 Kommentare zu “StayOnTop

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht.