Je dirais même plus...
function GetHandle(const p : TPoint): string;
var
Handle : Hwnd;
ClassName: PChar;
begin
Handle := WindowFromPoint(P);
getmem(ClassName, 40);
windows.GetClassName(Handle, ClassName, 40);
Result := IntToStr(Handle);
Freemem(ClassName);
end;
procedure TForm1.Timer1Timer(Sender: TObject);
var P: TPoint;
begin
GetCursorPos(P);
Label1.caption := GetHandle(P);
end;
Ca fait deux fois que tu le postes ce code, f0xi... tu as un peu de mal à le placer, on dirait ? lol 