{"id":70,"date":"2007-05-11T21:26:48","date_gmt":"2007-05-11T19:26:48","guid":{"rendered":" http:\/\/www.nsonic.de\/blog\/2007\/05\/align-app-without-covering-taskbar\/"},"modified":"2007-05-11T21:26:49","modified_gmt":"2007-05-11T19:26:49","slug":"align-app-without-covering-taskbar","status":"publish","type":"post","link":"https:\/\/www.nsonic.de\/blog\/2007\/05\/align-app-without-covering-taskbar\/","title":{"rendered":"Align App Without Covering TaskBar"},"content":{"rendered":"<p><em>Align App Without Covering TaskBar<br \/>\n(Make your app full screen without covering the Taskbar)<br \/>\nContributed by Nelson Williams<br \/>\n(I modified this a bit) <\/em><\/p>\n<p>[code lang=&#8221;delphi&#8221;]procedure TForm1.FormCreate(Sender: TObject);<br \/>\nvar<br \/>\n   hand:hWnd;<br \/>\n   r:tRect;<br \/>\nbegin<br \/>\n\/\/Get the handle of the Windows Taskbar.<br \/>\n hand := findWindow (&#8216;Shell_TrayWnd&#8217;, nil);<br \/>\n\/\/If the handle is not 0 then resume<br \/>\n  If hand <> 0 then<br \/>\n\/\/Get the rectangle of the Taskbar (the cord&#8217;s of area it covers)<br \/>\n   begin<br \/>\n    getWindowRect (hand, r);<br \/>\n\/\/if aligned at all then do this&#8230;<br \/>\n   If r.bottom-r.top <= 6 then\n     SetBounds(0,0,Screen.Width,Screen.height)\n   Else\n\/\/if aligned to RIGHT the side, then do set the bounderies of the form to..\n    If r.left > 0 then<br \/>\n      SetBounds(0,0,r.Left,Screen.Height)<br \/>\n    Else<br \/>\n\/\/if aligned to the LEFT side then do this&#8230;<br \/>\n     If R.right < Screen.Width-10 {jic} then\n        SetBounds(r.right,0,Screen.Width-r.Right,Screen.height)\n     Else\n\/\/If aligned on TOP then do this..\n      If R.bottom < Screen.height-10 {jic} then\n         SetBounds(0,r.bottom,Screen.Width,Screen.height-r.bottom)\n      Else\n\/\/If aligned on BOTTOM then do this...\n          SetBounds(0,0,Screen.Width,r.Top)\n      End\n       Else\n        SetBounds(0,0,GetSystemMetrics(SM_CXFULLSCREEN),GetSystemMetrics(SM_CYFULLSCREEN));\n\/\/r.left, r.right, r.top, and r.bottom give you the bounds of the task bar\n\/\/r.bottom - r.top gives you the height of the task bar\n\/\/if height < = 6, then it's autohide\nend;\n\n   \/\/Enjoy..Nelson.[\/code]\n\n[tags]Delphi, Application[\/tags]\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Align App Without Covering TaskBar (Make your app full screen without covering the Taskbar) Contributed by Nelson Williams (I modified this a bit)&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":[86,75],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p71Tml-18","_links":{"self":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/posts\/70"}],"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=70"}],"version-history":[{"count":0,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/posts\/70\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/media?parent=70"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/categories?post=70"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nsonic.de\/blog\/wp-json\/wp\/v2\/tags?post=70"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}