Windows - obtendo a posicao da barra de tarefas

Top  Previous  Next

// Obtendo a posicao da barra de tarefas

 

function RectBarraTarefas : TRect;

begin

  GetWindowRect(FindWindow('Shell_TrayWnd',nil),Result);

end;

 

procedure TForm1.FormCreate(Sender: TObject);

begin

  with RectBarraTarefas do begin

    Label1.Caption := Label1.Caption + IntToStr(Top);

    Label2.Caption := Label2.Caption + IntToStr(Left);

    Label3.Caption := Label3.Caption + IntToStr(Bottom);

    Label4.Caption := Label4.Caption + IntToStr(Right);

  end;  

end;