unit Unit1;

interface

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

type
  TForm1 = class(TForm)
    Button1: TButton;
    Button2: TButton;
    Button3: TButton;
    Button4: TButton;
    Button5: TButton;
    Button6: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure Button4Click(Sender: TObject);
    procedure Button5Click(Sender: TObject);
    procedure Button6Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
begin
MessageDlg('1',mtWarning,[mbOK],0);
MessageDlg('1',mtError,[mbOK],0);
MessageDlg('1',mtInformation,[mbOK],0);
MessageDlg('1',mtConfirmation,[mbOK],0);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
ShowMessage('2');
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
if MessageDlg('Yes?', mtConfirmation,
    [mbYes, mbNo], 0) = mrNo then
ShowMessage('NO') else ShowMessage('YES');


end;

procedure TForm1.Button4Click(Sender: TObject);
begin
MessageBox(0,'1', 'Сообщение(API)',MB_OK);
end;

procedure TForm1.Button5Click(Sender: TObject);
begin
if MessageBox(0,
        'OK?',
        '?',
        MB_OKCANCEL + MB_DEFBUTTON1) = IDOK then
        MessageBox(0,'ok', '1',MB_OK);
{см файл appma.htm}
end;

procedure TForm1.Button6Click(Sender: TObject);
begin
if MessageBox(0,
        'OK?',
        '?',
         MB_YESNOCANCEL ) = IDOK then
        MessageBox(0,'ok', '1',MB_OK);

end;

end.
