{"id":117,"date":"2007-05-12T14:31:56","date_gmt":"2007-05-12T12:31:56","guid":{"rendered":" http:\/\/www.nsonic.de\/blog\/2007\/05\/stayontop\/"},"modified":"2007-05-12T14:31:58","modified_gmt":"2007-05-12T12:31:58","slug":"stayontop","status":"publish","type":"post","link":"https:\/\/www.nsonic.de\/blog\/2007\/05\/stayontop\/","title":{"rendered":"StayOnTop"},"content":{"rendered":"<p>Liang Liem  wrote in message<br \/>\nnews:<br \/>\n37660B6D.83D9E151@capelon.se&#8230; <\/p>\n<p><em>Hi,<\/p>\n<p>I have a delphi-application that always using one of two forms. The<br \/>\napplication needs<br \/>\nto be on top of any other application that may exist on the screen.<br \/>\nI have tried to switch the FormStyle property to FStayOnTop on the form<br \/>\nthat is currently<br \/>\nvisible (and FStayOnTop off for the hidden form). However, it does not<br \/>\nwork properly.<br \/>\nThe delphi help also recommends to not change that property<br \/>\nduring run-time.<\/p>\n<p>Is there any other way to make a form stay on top on the screen ?<\/p>\n<p>Regards<br \/>\nLiang Liem<br \/>\n<\/em><\/p>\n<p>Formular immer im Vordergrund anzeigen &#8211; auch nachtr\u00e4glich!<br \/>\nStay on Top <\/p>\n<p>[code lang=&#8221;delphi&#8221;]Try this:<\/p>\n<p>Function ShowFormTop(Frm:TForm):Boolean ;<br \/>\nBegin<br \/>\n   Result := SetWindowPos(Frm.Handle,HWND_TOPMOST,<br \/>\n                          Frm.Left,Frm.Top,Frm.Width,Frm.Height,<br \/>\n                          SWP_SHOWWINDOW);<br \/>\n   Frm.Update ;<br \/>\nEnd;<br \/>\n[\/code]<br \/>\n-Steve-<\/p>\n<p>[tags]Delphi, Forms[\/tags]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Liang Liem wrote in message news: 37660B6D.83D9E151@capelon.se&#8230; Hi, I have a delphi-application that always using one of two forms. The application needs to&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[11],"tags":[75,100],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p71Tml-1T","_links":{"self":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/posts\/117"}],"collection":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/comments?post=117"}],"version-history":[{"count":0,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/posts\/117\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/media?parent=117"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/categories?post=117"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/tags?post=117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}