A partir de la solución que
se muestra por ejemplo en este hilo, puedes hacer algo como esto:
1) Crea un proyecto VCL nuevo
2) Coloca un Timer
3) Programa los eventos OnCreate y OnTimer con lo siguiente:
Código Delphi
[-]
procedure TForm2.FormCreate(Sender: TObject);
begin
VMess := FindWindow('Notepad', nil);
Timer1.Interval := 50;
end;
procedure TForm2.Timer1Timer(Sender: TObject);
var
Tam: TRect;
begin
if vMess <> 0 then begin
GetWindowRect(VMess, Tam);
Self.Caption := 'Posición: ' + InttoStr(Tam.Left) + ' ; ' + IntToStr(Tam.Top) + ' - '
+'Tamaño: ' + IntToStr(Tam.Right - Tam.Left) + 'x' + IntToStr(Tam.Bottom - Tam.Top);
end
end;
4) La variable debe estar definida como (global o como propiedad):
Debería resultar algo así: