假定你是 aryBtn : array of TButton;
var
theID:integer;
begin
if sender is TButton then begin
  theID := (Sender As TButton).Tag;
end;
end;