Arsip: Membaca Ukuran TaskBar Windws


by delphi in Articles more 19 years ago 2088
skrip berikut merupakan contoh fungsi untuk membaca ukuran TaskBar Windows.
var
hApp : THandle;
rcWork : TRect;
rcApp : TRect;
begin
// Ambil parameter desktop
rcWork.Top := 0;
rcWork.Left := 0;
rcWork.Right := Screen.DesktopWidth;
rcWork.Bottom:= Screen.DesktopHeight;
// ambil parameter TaskBar
hApp := FindWindow('Shell_TrayWnd','');
if hApp <> 0 then
begin
GetWindowRect(hApp,rcApp);
if rcApp.Right < rcWork.Right then
rcWork.Left := rcApp.Right; { bar on left edge }
if rcApp.Bottom < rcWork.Bottom then
rcWork.Top := rcApp.Bottom; { bar on top edge }
rcWork.Bottom:=rcWork.Bottom - rcApp.Bottom;{ bar on top edge }
if rcApp.Left > 0 then
rcWork.Right := rcApp.Left; { bar on right edge }
if rcApp.Top > 0 then
rcWork.Bottom := rcApp.Top; { bar on bottom edge }
end;

Local Business Directory, Search Engine Submission & SEO Tools FreeWebSubmission.com SonicRun.com