unit Main;

interface

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

type
  TMainForm = class(TForm)
    BitBtn1: TBitBtn;
    BitBtn10: TBitBtn;
    BitBtn11: TBitBtn;
    BitBtn12: TBitBtn;
    BitBtn2: TBitBtn;
    BitBtn3: TBitBtn;
    BitBtn4: TBitBtn;
    BitBtn5: TBitBtn;
    BitBtn6: TBitBtn;
    BitBtn7: TBitBtn;
    BitBtn9: TBitBtn;
    BitBtnCLOSE: TBitBtn;
    MainMenu1: TMainMenu;
    Akcja1: TMenuItem;
    Koniec1: TMenuItem;
    procedure Koniec1Click(Sender: TObject);
    procedure BitBtn12Click(Sender: TObject);

  private
	 procedure Koniec();

  public

  end;

var
  MainForm: TMainForm;

implementation
{$R *.dfm}

procedure TMainForm.BitBtn12Click(Sender: TObject);
begin
	ShowMessage('Wybrano przycisk z Caption = "Mój opis"');
   ModalResult := mrNone;
end;

procedure TMainForm.Koniec1Click(Sender: TObject);
begin
	Koniec();
end;

procedure TMainForm.Koniec();
begin
	if Application.MessageBox('Koniec pracy', 'Uwaga', MB_ICONINFORMATION or MB_YESNO) = mrYes then
	begin
		Close();
   end;
end;

end.
