unit Unit1;

interface

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

type
  TForm1 = class(TForm)
    Label1: TLabel;
    Button1: TButton;
    Button2: TButton;
    Button3: TButton;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    procedure Button3Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var i: integer;
begin
for i:=1 to 10000 do
  begin
    Label1.Caption:=InttoStr(i);
    Application.ProcessMessages;
  end;

end;

procedure TForm1.Button2Click(Sender: TObject);
begin
   Label2.Caption:='Napis po klikniêciu przycisku Button2 lub Button3';
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
  Button2.Click;
end;

end.
