第一种:需要引用Windows单元
- ShowMessage(IntToStr(GetSystemMetrics(SM_CYSCREEN)-GetSystemMetrics(SM_CYFULLSCREEN)-GetSystemMetrics(SM_CYCAPTION)));
第二种:需要引用Windows单元
- function GetSystemTaskBarHeight:Integer;
- var
- R:TRect;
- begin
- SystemParametersInfo(SPI_GETWORKAREA,0,@R,0);
- Result:=Screen.Height-R.Bottom;
- end;
第三种:要引用ShellAPI单元
- 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