31-03-2013, 08:04 PM
تفضل أخي .. فقط أضف تايمر
PHP كود :
procedure TForm1.Timer1Timer(Sender: TObject);
var p: TPoint ;
hWin:THandle;
CN: PChar;
begin
GetCursorPos(p);
hWin:=WindowFromPoint(p);
Caption:=IntToHex(hWin,8);
GetMem(CN,250);
Windows.GetClassNameA(hWin,CN,250);
Edit1.Text:=CN;
Edit2.Text:=IntToHex(GetForegroundWindow,8);
FreeMem(CN,250);
end;

