Just put it in a function/procedure and call it. Define it like this:
interface
TForm1 = class(TForm)
private
procedure RepetitiveTask;
end;
implementation
procedure TForm1.RepetitiveTask;
begin
// ...
end;
pritaeas
Posting Expert
5,480 posts since Jul 2006
Reputation Points: 653
Solved Threads: 874