第一种:需要引用Windows单元
[delphi] view plain copy
- ShowMessage(IntToStr(GetSystemMetrics(SM_CYSCREEN)-GetSystemMetrics(SM_CYFULLSCREEN)-GetSystemMetrics(SM_CYCAPTION)));
第二种:需要引用Windows单元
[delphi] view plain copy
- function GetSystemTaskBarHeight:Integer;
- var
- R:TRect;
- begin
- SystemParametersInfo(SPI_GETWORKAREA,0,@R,0);
- Result:=Screen.Height-R.Bottom;
- end;
第三种:要引用ShellAPI单元
[delphi] view plain copy
- function GetTaskBarRect: Integer;
- var
- TBData: TAPPBARDATA;
- begin
- TBData.cbSize := SizeOf(TAPPBARDATA);
- SHAppBarMessage(ABM_GETTASKBARPOS, TBData);
- Result :=Screen.Height-TBData.rc.Top;
- end;
http://blog.csdn.net/chaijunkun/article/details/5577285
时间: 2024-10-12 09:57:38