unit Unit1;

interface

uses
  SysUtils, Windows, Messages, Classes, Graphics, Controls,
  Forms, Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Edit1: TEdit;
    procedure FormPaint(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
    Iteration: Integer;
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.FormPaint(Sender: TObject);
begin
 Iteration := Iteration + 1;
 Form1.Canvas.Pie(100,100,200,200,100,100,100,200);
 Edit1.Text := IntToStr(Iteration);
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
 Iteration := 0;
end;

end.