unit mainUnit;

interface

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

type
  TMainForm = class(TForm)
    Panel1: TPanel;
    ExitButton: TSpeedButton;
    BulboffButton: TSpeedButton;
    BulbonButton: TSpeedButton;
    StartBtn: TBitBtn;
    procedure ExitButtonClick(Sender: TObject);
    procedure StartBtnClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  MainForm: TMainForm;

implementation

uses Unit2;

{$R *.dfm}

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

procedure TMainForm.StartBtnClick(Sender: TObject);
begin
 Form2.ShowModal;

 if Form2.ModalResult=mrOk then
  Application.MessageBox('Вы нажали кнопку OK', 'Вы нажали');

 if Form2.ModalResult=mrCancel then
  Application.MessageBox('Вы нажали кнопку Cancel', 'Вы нажали');

 if Form2.ModalResult=mrAbort then
  Application.MessageBox('Вы нажали кнопку Abort', 'Вы нажали');
end;

end.
