We don't display ads so we rely on your Bitcoin donations to 1KWEk9QaiJb2NwP5YFmR24LyUBa4JyuKqZ
Post date: Mar 16, 2010 3:51:04 PM
Retreives the title of the active window.
function ActiveCaption: string;var Handle: THandle; Len: LongInt; Title: string;begin Result := ''; Handle := GetForegroundWindow; if Handle <> 0 then begin Len := GetWindowTextLength(Handle) + 1; SetLength(Title, Len); GetWindowText(Handle, PChar(Title), Len); ActiveCaption := TrimRight(Title); end;end;