unit Unit2;

interface

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

type
  TForm2 = class(TForm)
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  private

  public
	 nrokna : Integer;
    constructor Create(AOwner : TComponent; par_nrokna: Integer);
  end;

//var						// celowo zablokowane!
//   Form2: TForm2;	// celowo zablokowane!

implementation
{$R *.dfm}
{------------------------------------------------------------------------------}
constructor TForm2.Create(AOwner : TComponent; par_nrokna: Integer);
begin
	inherited Create(AOwner);

   nrokna  := par_nrokna;
   Caption := 'Okno numer ' + IntToStr(nrokna);
end;

procedure TForm2.FormClose(Sender: TObject; var Action: TCloseAction);
begin
	Action := caFree;
end;

end.
