Marco's Web Center

Menu for Development

Site Menu
Object Pascal Handbook
Delphi Handbooks Collection
Mastering Borland Delphi 2005
(Old) White Papers
(Old)Tools
(Old) Conferences

My Other Sites
Italian Site (www.marcocantu.it)
the delphi search

Spirit of delphi

Advertising
Home My Blog Books Object Pascal Marco

Home: Code Repository: Mastering Delphi 5

Project FIRE2

Project Structure


FIRE2.DPR

program Fire2;

uses
  Forms,
  FireForm in 'FireForm.pas' {Form1};

{$R *.RES}

begin
  Application.CreateForm(TForm1, Form1);
  Application.Run;
end.

FIREFORM.PAS

unit FireForm;

interface

uses
  Windows, Classes, Graphics, Forms,
  Controls, Buttons, Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    BitBtnFire: TBitBtn;
    CheckBox1: TCheckBox;
    procedure BitBtnFireClick(Sender: TObject);
    procedure CheckBox1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

uses MMSystem;

{$R *.DFM}

procedure TForm1.BitBtnFireClick(Sender: TObject);
begin
  PlaySound ('Boom.wav', 0, snd_Async);
  MessageDlg ('Boom!', mtWarning, [mbOk], 0);
end;

procedure TForm1.CheckBox1Click(Sender: TObject);
begin
  BitBtnFire.Enabled := CheckBox1.Checked;
end;

end.

FIREFORM.DFM

object Form1: TForm1
  Left = 189
  Top = 158
  Width = 248
  Height = 175
  ActiveControl = BitBtnFire
  Caption = 'Fire Form'
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clBlack
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  PixelsPerInch = 96
  TextHeight = 13
  object BitBtnFire: TBitBtn
    Left = 50
    Top = 56
    Width = 121
    Height = 57
    Caption = 'Fire'
    TabOrder = 0
    OnClick = BitBtnFireClick
    Glyph.Data = {
      36100000424D3610000000000000360400002800000060000000200000000100
      080000000000000C000000000000000000000001000000000000000000000000
      80000080000000808000800000008000800080800000C0C0C000C0DCC000F0CA
      A600000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      000000000000000000000000000000000000F0FBFF00A4A0A000808080000000
      FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      000000000000000000000000000000000000000000000000000000FAFAFAFAFA
      FAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFA00000202020202
      020202020202020202020202020202020202020202020202020000FAFAFAFAFA
      FAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFA0000FAFAFAFAFA
      FAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFA00000202020202
      020202020202020202020202020202020202020202020202020000FAFAFAFAFA
      FAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFA0000FEFEFEFEFE
      FE00000000000000FEFEFEFAFAFAFAFAFAFAFAFAFAFAFAFAFA00000707070707
      070000000000000007070702020202020202020202020202020000FEFEFEFEFE
      FE00000000000000FEFEFEFAFAFAFAFAFAFAFAFAFAFAFAFAFA0000FEFEFEFEFE
      FE00000000000000FEFEFEFEFEFAFAFAFAFAFAFAFAFAFAFAFA00000707070707
      070000000000000007070707070202020202020202020202020000FEFEFEFEFE
      FE00000000000000FEFEFEFEFEFAFAFAFAFAFAFAFAFAFAFAFA0000FEFEFEFEFE
      FE000000000000F800FEFEFEFEFEFEFEFEFAFAFAFAFAFAFAFA00000707070707
      07000000000000F800070707070707070702020202020202020000FEFEFEFEFE
      FE000000000000F800FEFEFEFEFEFEFEFEFAFAFAFAFAFAFAFA0000FEFEFEFEFE
      0000F8000000F8F8F800FEFEFEFEFEFEFEFEFEFEFAFAFAFAFA00000707070707
      0000F8000000F8F8F8000707070707070707070702020202020000FEFEFEFEFE
      0000F8000000F8F8F800FEFEFEFEFEFEFEFEFEFEFAFAFAFAFA0000FEFEFEFEFE
      00F8F8F8F8F8F8F8F8F800FEFEFEFEFEFEFEFEFEFEFEFAFAFA00000707070707
      00F8F8F8F8F8F8F8F8F80007070707070707070707070202020000FEFEFEFEFE
      00F8F8F8F8F8F8F8F8F800FEFEFEFEFEFEFEFEFEFEFEFAFAFA0000FEFEFEFEFE
      00F807F8F8F8F8F8F8F8F800FEFEFEFEFEFEFEFEFEFEFEFEFA00000707070707
      00F807F8F8F8F8F8F8F8F800070707070707070707070707020000FEFEFEFEFE
      00F807F8F8F8F8F8F8F8F800FEFEFEFEFEFEFEFEFEFEFEFEFA0000FEFEFEFEFE
      00F8FF07F8F8F8F8F8F8F8F800FEFEFEFEFEFEFEFEFEFEFEFE00000707070707
      00F8FF07F8F8F8F8F8F8F8F8000707070707070707070707070000FEFEFEFEFE
      00F8FF07F8F8F8F8F8F8F8F800FEFEFEFEFEFEFEFEFEFEFEFE0000FEFEFEFEFE
      FE00F8FF07F8F8F8F8F8F8F8F800FEFEFEFEFEFEFEFEFEFEFE00000707070707
      0700F8FF07F8F8F8F8F8F8F8F80007070707070707070707070000FEFEFEFEFE
      FE00F8FF07F8F8F8F8F8F8F8F800FEFEFEFEFEFEFEFEFEFEFE0000FEFEFEFEFE
      FEFE00F8FF07F8F8F8F8F8F800FEFEFEFEFEFEFEFEFEFEFEFE00000707070707
      070700F8FF07F8F8F8F8F8F8000707070707070707070707070000FEFEFEFEFE
      FEFE00F8FF07F8F8F8F8F8F800FEFEFEFEFEFEFEFEFEFEFEFE0000FEFEFEFEFE
      FEFEFE00F8FF07F8F8F8F800FEFEFEFEFEFEFEFEFEFEFEFEFE00000707070707
      07070700F8FF07F8F8F8F800070707070707070707070707070000FEFEFEFEFE
      FEFEFE00F8FF07F8F8F8F800FEFEFEFEFEFEFEFEFEFEFEFEFE0000FEFEFEFEFE
      FEFEFEFE00F8FF07F8F800FEFEFEFEFEFEFEFEFEFEFEFEFEFE00000707070707
      0707070700F8FF07F8F80007070707070707070707070707070000FEFEFEFEFE
      FEFEFEFE00F8FF07F8F800FEF9F9F9F9F9FEFEFEFEFEFEFEFE0000FEFEFEFEFE
      FEFEFEFEFE00F8F8F800FEFEFEFEFEFEFEFEFEFEFEFEFEFEFE00000707070707
      070707070700F8F8F8000707070707070707070707070707070000FEFEFEFEFE
      FEFEFEFEFE00F8F8F800FEFEF9FBFBFBFEFEFEFEFEFEFEFEFE0000FEFEFEFEFE
      FEFEFEFEFEFE00F800FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFE00000707070707
      07070707070700F800070707070707070707070707070707070000FEFEFEFEFE
      FEFEFEFEFEFE00F800FEF9F9F9F9F9FEFEFEFEFEFEFEFEFEFE0000FEFEFEFEFE
      FEFEFEFEFEFEFE00FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFE00000707070707
      070707070707070007070707070707070707070707070707070000FEFEFEFEFE
      FEFEFEFEFEFEFE00FEFEF9FBF9FBFEFEFEFEFEFEFEFEFEFEFE0000FEFEFEFEFE
      FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFE00000707070707
      070707070707070707070707070707070707070707070707070000FEFEFEFEFE
      FEFEFEFEFEFEFEFEFEFEF9FBF9FEFEFEFEFEFEFEFEFEFEFEFE0000FEFEFEFEFE
      FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFE00000707070707
      070707070707070707070707070707070707070707070707070000FEFEFEFEFE
      FEFEFEFEFEFEFEFEFEFEF9FBFEFEFEFEFEFEFEFEFEFEFEFEFE0000FEFEFEFEFE
      FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFE00000707070707
      070707070707070707070707070707070707070707070707070000FEFEFEFEFE
      FEFEFEFEFEFEFEFEFEFEF9FEFEFEFEFEFEFE00000000FEFEFE0000FEFEFEFEFE
      FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFE00000707070707
      070707070707070707070707070707070707070707070707070000FEFEFEFEFE
      FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFE00F8F8F8F800FEFE0000FEFEFEFEFE
      FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFE00000707070707
      070707070707070707070707070707070707070707070707070000FEFEFEFEFE
      FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFE00F8F8F8F8F8F800FE0000FEFEFEFEFE
      FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFE00000707070707
      070707070707070707070707070707070707070707070707070000FEFEFEFEFE
      FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFE00F8F8F8F8F8F800FE0000FEFEFEFEFE
      FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFE00000707070707
      070707070707070707070707070707070707070707070707070000FEFEFEFEFE
      FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFE00F80707F8F8F800FE0000FEFEFEFEFE
      FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFE00000707070707
      070707070707070707070707070707070707070707070707070000FEFEFEFEFE
      FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFE0007FF0707F8F800FE0000FEFEFEFEFE
      FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFE00000707070707
      070707070707070707070707070707070707070707070707070000FEFEFEFEFE
      FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFE00FFFF07F800FEFE0000FEFEFEFEFE
      FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFE00000707070707
      070707070707070707070707070707070707070707070707070000FEFEFEFEFE
      FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFE00000000FEFEFE0000FEFEFEFEFE
      FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFE00000707070707
      070707070707070707070707070707070707070707070707070000FEFEFEFEFE
      FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFE0000FEFEFEFEFE
      FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFE00000707070707
      070707070707070707070707070707070707070707070707070000FEFEFEFEFE
      FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFE0000FEFEFEFEFE
      FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFE00000707070707
      070707070707070707070707070707070707070707070707070000FEFEFEFEFE
      FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFE0000FEFEFEFEFE
      FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFE00000707070707
      070707070707070707070707070707070707070707070707070000FEFEFEFEFE
      FEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFEFE00000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000}
    NumGlyphs = 3
    Spacing = 15
  end
  object CheckBox1: TCheckBox
    Left = 47
    Top = 24
    Width = 130
    Height = 25
    Caption = 'Enable Bitmap Button'
    State = cbChecked
    TabOrder = 1
    OnClick = CheckBox1Click
  end
end