Delphi-Quellcode:
procedure StarteRoutineByName(Instance : TObject; Name : string);
type
TExecute = procedure of object;
var
Routine : TMethod;
Execute : TExecute;
begin
Routine.Data := Pointer(Instance);
Routine.Code := Instance.MethodAddress(Name);
if Routine.Code = nil then Exit;
Execute := TExecute(Routine);
Execute;
end;
z.b. StarteRoutineByName(Form1,'berechneumfang'); //so oder so ähnlich war der aufruf
Thomas H.