var h:HWND; p:TPoint; con:TControl; begin GetCursorPos(p); h := WindowFromPoint(p); if h > 0 then begin con := FindControl(h); ShowMessage(con.ClassName); //处理con end; end;
var h:HWND; p:TPoint; con:TControl; begin GetCursorPos(p); h := WindowFromPoint(p); if h > 0 then begin con := FindControl(h); ShowMessage(con.ClassName); //处理con end; end;
var
h:HWND;
p:TPoint;
con:TControl;
begin
GetCursorPos(p);
h := WindowFromPoint(p);
if h > 0 then
begin
con := FindControl(h);
ShowMessage(con.ClassName);
//处理con
end;
end;
var
h:HWND;
p:TPoint;
con:TControl;
begin
GetCursorPos(p);
h := WindowFromPoint(p);
if h > 0 then
begin
con := FindControl(h);
ShowMessage(con.ClassName);
//处理con
end;
end;