From: "François GAILLARD" Newsgroups: borland.public.delphi.non-technical References: <3ba2fdfd_2@dnews> Subject: Re: taskbar's height? Date: Sat, 15 Sep 2001 15:14:20 +0200 Lines: 50 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 NNTP-Posting-Host: 195.154.51.76 Message-ID: <3ba3541c$1_2@dnews> X-Trace: dnews 1000559644 195.154.51.76 (15 Sep 2001 06:14:04 -0700) Path: dnews Xref: dnews borland.public.delphi.non-technical:253755 that should do it : ______________ procedure StandardArea; { set workarea to standard screen (= excluding taskbar) } var hApp: HWND; rcApp, rcWork: TRect; begin { prepare a default fullscreen workarea } rcWork.Top:=0; rcWork.Left:=0; rcWork.Bottom:= GetSystemMetrics(SM_CYSCREEN); rcWork.Right:= GetSystemMetrics(SM_CXSCREEN); { get the taskbar handle } hApp := FindWindow('Shell_TrayWnd', ''); if hApp <> 0 then begin { get the size of the taskbar } GetWindowRect(hApp, rcApp); { cut the workarea to place the taskbar } if rcApp.Right0 then rcWork.Right:=rcApp.Left; { bar on right edge } if rcApp.Top>0 then rcWork.Bottom:=rcApp.Top; { bar on bottom edge } end; { set workarea } SystemParametersInfo (SPI_SETWORKAREA, 0, @rcWork, SPIF_SENDCHANGE ); end; { StandardArea } -- François GAILLARD Paris, FRANCE fg[@]fgaillard.com www.fgaillard.com Look at my poor man's memory leak tracker: http://www.fgaillard.com/English/prod.htm "cuift" wrote in message news:3ba2fdfd_2@dnews... > I want to know windows taskbar's Height > thus I can control my form size. > > >