Text komponentov
Jednotlivé komponenty obsahujú nejaký text. Tento kód ho umožňuje získať z ľubovolného komponentu.
procedure TForm1.Timer1Timer(Sender: TObject); Var p : TPoint; h : THandle; buf : Array[0..255] of Char; begin GetCursorPos(p); h := WindowFromPoint(p); SendMessage(h, WM_GETTEXT, 255, Integer(@Buf)); Label1.Caption := Buf; end;