unit FormMain;

interface

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

type
  TMainForm = class(TForm)
    Panel1: TPanel;
    cbClose: TSpeedButton;
    sbStart: TSpeedButton;
    StatusBar1: TStatusBar;
    procedure cbCloseClick(Sender: TObject);
    procedure sbStartClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  MainForm: TMainForm;

implementation

uses FormOsoby;

{$R *.dfm}

procedure TMainForm.cbCloseClick(Sender: TObject);
begin
   Close();
end;

procedure TMainForm.sbStartClick(Sender: TObject);
var
   Okno_juz_otwarte : Boolean;

begin
   Okno_juz_otwarte := Assigned(FOsoby);

   if not Okno_juz_otwarte then
   begin
      FOsoby := TFOsoby.Create(Self);
      FOsoby.Show();
   end;
end;

end.

