Цитата:
Сообщение от Yurk@
не, прийдется перебирать всё
|
Спасибо за помощь, вот что получилось.
Код:
var
i:integer;
p:TPoint;
myCursorPos: TPoint;
begin
myCursorPos:= Mouse.CursorPos;
for i:=0 to ComponentCount-1 do begin
if not (Components[i] is TWinControl) then Continue;
with TWinControl(Components[i]) do begin
p:=ClientToScreen(Point(0,0));
if
(myCursorPos.X>=p.X)and(myCursorPos.Y>=p.Y) and
(myCursorPos.X<=(p.X+Width))and(myCursorPos.Y<=(p.Y+Height)) then
begin
компонент с именем Name под мышкой
end
end;
end;
end;