unit FormMain;

interface

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

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

var
  FMain: TFMain;

implementation

uses BOsoby;

{$R *.dfm}

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

procedure TFMain.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.

