unit Unit_14;

interface

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

type      
  TForm1 = class(TForm)
    Button1: TButton;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);

    procedure FormClose(Sender: TObject;
                        var Action: TCloseAction);

  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

//---------------------------------------------------------
procedure TForm1.Button2Click(Sender: TObject);
begin
   Canvas.Font.Color:=clBlue;
   Canvas.Font.Height:=30;
   Canvas.TextOut(ClientHeight div 4,ClientWidth div 4,
                  ' Pierwsza aplikacja w Delphi 7');
end;
//---------------------------------------------------------
procedure TForm1.FormClose(Sender: TObject;
                           var Action: TCloseAction);
begin
   case (MessageBox(0, 'Zamkniêcie aplikacji ?','Uwaga',
         MB_YESNO or MB_ICONQUESTION)) of
     ID_YES:
         Action := caFree;
     ID_NO:
         Action := caNone;
    end;
end;
//---------------------------------------------------------
procedure TForm1.Button1Click(Sender: TObject);
begin
   Application.Terminate();
end;
//---------------------------------------------------------
end.

