获取任务栏尺寸

procedure TForm1.Button1Click(Sender: TObject);
var
TaskList: HWnd;
Bordered: TRect;
begin
TaskList := FindWindow(’Shell_TrayWnd’, nil);
GetWindowRect(TaskList, Bordered);
Label1.Caption := ’Left: ’ + IntToStr(Bordered.Left);
Label2.Caption := ’Right: ’ + IntToStr(Bordered.Right);
Label3.Caption := ’Top: ’ + IntToStr(Bordered.Top);
Label4.Caption := ’Bottom: ’ + IntToStr(Bordered.Bottom);
end;

你可能感兴趣的:(获取)