function GetWinTrayWnd: Integer; // 获取windows任务栏高度 var TrayWnd: HWnd; //任务栏句柄 Rec : TRect; begin TrayWnd := FindWindow('Shell_TrayWnd',nil);//得到任务栏句柄 GetWindowRect(TrayWnd, Rec); //获取任务栏尺寸 result := Rec.Bottom - Rec.Top; end;