Arsip: Mengambil aktif caption bar suatu aplikasi


by nickqin in Articles more 13 years ago 1096
Berikut cara mengambil aktif caption bar suatu aplikasi
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;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
label1.Caption :=ActiveCaption;
end;
Syntax Highlighted with https://pascal-id.org/syntax


Semoga bermanfaat
Local Business Directory, Search Engine Submission & SEO Tools FreeWebSubmission.com SonicRun.com