GetCursorPos WindowFromPoint GetlassName
procedure TForm1.Timer1Timer(Sender: TObject);
var
pt: TPoint;
arr: array[0..254] of Char;
begin
if GetCursorPos(pt) then {如果能获取点}
begin
h := WindowFromPoint(pt); {返回句柄}
GetClassName(h, arr, Length(arr)); {获取该句柄窗口的类名}
Text := arr; {显示在标题}
end;
end;

浙公网安备 33010602011771号