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 6

Chapter 10 - Project Mdidemo

Project Structure

Mdidemo.dpr
program Mdidemo;

uses
  Forms,
  Frame in 'Frame.pas' {MainForm},
  Child in 'Child.pas' {ChildForm};

{$R *.RES}

begin
  Application.CreateForm(TMainForm, MainForm);
  Application.Run;
end.
Frame.pas
unit Frame;

interface

uses
  Windows, Classes, Graphics, Forms, Controls,
  Child, Menus, SysUtils, StdActns, ActnList, Dialogs, ImgList, ComCtrls,
  ToolWin;

type
  TMainForm = class(TForm)
    MainMenu1: TMainMenu;
    Window1: TMenuItem;
    New1: TMenuItem;
    File1: TMenuItem;
    N1: TMenuItem;
    Exit1: TMenuItem;
    Cascade1: TMenuItem;
    Tile1: TMenuItem;
    ArrangeIcons1: TMenuItem;
    ActionList1: TActionList;
    ActionArrange: TWindowArrange;
    ActionCascade: TWindowCascade;
    ActionClose: TWindowClose;
    ActionMinimizeAll: TWindowMinimizeAll;
    ActionTileHorizontal: TWindowTileHorizontal;
    ActionTileVertical: TWindowTileVertical;
    Tile2: TMenuItem;
    Close1: TMenuItem;
    MinimizeAll1: TMenuItem;
    Edit1: TMenuItem;
    Cut1: TMenuItem;
    Copy1: TMenuItem;
    Paste1: TMenuItem;
    ActionCopy: TEditCopy;
    ActionCut: TEditCut;
    ActionPaste: TEditPaste;
    ActionFont: TAction;
    FontDialog1: TFontDialog;
    N2: TMenuItem;
    Font1: TMenuItem;
    ActionNew: TAction;
    ActionOpen: TAction;
    ActionSaveAs: TAction;
    OpenDialog1: TOpenDialog;
    SaveDialog1: TSaveDialog;
    Open1: TMenuItem;
    Save1: TMenuItem;
    ActionSave: TAction;
    Save2: TMenuItem;
    ImageList1: TImageList;
    ToolBar1: TToolBar;
    ToolButton1: TToolButton;
    ToolButton2: TToolButton;
    ToolButton3: TToolButton;
    ToolButton4: TToolButton;
    ToolButton5: TToolButton;
    ToolButton6: TToolButton;
    ToolButton7: TToolButton;
    ToolButton8: TToolButton;
    procedure Exit1Click(Sender: TObject);
    procedure ActionFontExecute(Sender: TObject);
    procedure ActionFontUpdate(Sender: TObject);
    procedure ActionNewExecute(Sender: TObject);
    procedure ActionOpenExecute(Sender: TObject);
    procedure ActionSaveAsExecute(Sender: TObject);
    procedure ActionSaveAsUpdate(Sender: TObject);
    procedure ActionSaveUpdate(Sender: TObject);
    procedure ActionSaveExecute(Sender: TObject);
  private
    { Private declarations }
    Counter: Integer;
  public
    { Public declarations }
  end;

var
  MainForm: TMainForm;

implementation

{$R *.DFM}

procedure TMainForm.Exit1Click(Sender: TObject);
begin
  // automatically closes each child
  Close;
end;

procedure TMainForm.ActionFontExecute(Sender: TObject);
begin
  if FontDialog1.Execute then
    (ActiveMDIChild as TChildForm).Memo1.Font :=
      FontDialog1.Font;
end;

procedure TMainForm.ActionFontUpdate(Sender: TObject);
begin
  ActionFont.Enabled := MDIChildCount > 0;
end;

procedure TMainForm.ActionNewExecute(Sender: TObject);
var
  ChildForm: TChildForm;
begin
  Inc (Counter);
  ChildForm := TChildForm.Create (Self);
  ChildForm.Caption :=
    LowerCase (ExtractFilePath (Application.Exename)) +
    'text' + IntToStr (Counter) + '.txt';
  ChildForm.Show;
end;

procedure TMainForm.ActionOpenExecute(Sender: TObject);
begin
  if OpenDialog1.Execute then
  begin
    ActionNewExecute (Self);
    (ActiveMDIChild as TChildForm).Load (OpenDialog1.FileName);
  end;
end;

procedure TMainForm.ActionSaveAsExecute(Sender: TObject);
begin
  // suggest the current file name
  SaveDialog1.FileName := ActiveMDIChild.Caption;
  if SaveDialog1.Execute then
  begin
    // modify the file name and save
    ActiveMDIChild.Caption := SaveDialog1.FileName;
    (ActiveMDIChild as TChildForm).Save;
  end;
end;

procedure TMainForm.ActionSaveAsUpdate(Sender: TObject);
begin
  ActionSaveAs.Enabled := MDIChildCount > 0;
end;

procedure TMainForm.ActionSaveUpdate(Sender: TObject);
begin
  ActionSave.Enabled := (MDIChildCount > 0) and
    (ActiveMDIChild as TChildForm).Modified;
end;

procedure TMainForm.ActionSaveExecute(Sender: TObject);
begin
  (ActiveMDIChild as TChildForm).Save;
end;

end.
Child.pas
unit Child;

interface

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

type
  TChildForm = class(TForm)
    Memo1: TMemo;
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure Memo1Change(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
  private
    fModified: Boolean;
    procedure SetModified(const Value: Boolean);
  public
    procedure Load (FileName: string);
    procedure Save;
    property Modified: Boolean
      read FModified write SetModified;
  end;

var
  ChildForm: TChildForm;

implementation

{$R *.DFM}

procedure TChildForm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  Action := caFree;
end;

procedure TChildForm.Memo1Change(Sender: TObject);
begin
  fModified := True;
end;

procedure TChildForm.FormCreate(Sender: TObject);
begin
  fModified := False;
end;

procedure TChildForm.FormCloseQuery(Sender: TObject;
  var CanClose: Boolean);
begin
  CanClose := not fModified or (MessageDlg ('Close without saving?',
    mtConfirmation, [mbYes, mbNo], 0) = mrYes);
end;

procedure TChildForm.Load (FileName: string);
begin
  Memo1.Lines.LoadFromFile (FileName);
  Caption := FileName;
  fModified := False;
end;

procedure TChildForm.Save;
begin
  Memo1.Lines.SaveToFile (Caption);
  fModified := False;
end;

procedure TChildForm.SetModified(const Value: Boolean);
begin
  FModified := Value;
end;

end.
Frame.dfm
object MainForm: TMainForm
  Left = 245
  Top = 201
  Width = 435
  Height = 300
  Caption = 'MDI Frame'
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -13
  Font.Name = 'System'
  Font.Style = []
  FormStyle = fsMDIForm
  Menu = MainMenu1
  OldCreateOrder = True
  Position = poDefault
  WindowMenu = Window1
  PixelsPerInch = 96
  TextHeight = 16
  object ToolBar1: TToolBar
    Left = 0
    Top = 0
    Width = 427
    Height = 29
    Caption = 'ToolBar1'
    Images = ImageList1
    TabOrder = 0
    object ToolButton1: TToolButton
      Left = 0
      Top = 2
      Action = ActionNew
    end
    object ToolButton2: TToolButton
      Left = 23
      Top = 2
      Action = ActionOpen
    end
    object ToolButton3: TToolButton
      Left = 46
      Top = 2
      Action = ActionSave
    end
    object ToolButton4: TToolButton
      Left = 69
      Top = 2
      Action = ActionClose
    end
    object ToolButton5: TToolButton
      Left = 92
      Top = 2
      Width = 8
      Caption = 'ToolButton5'
      ImageIndex = 4
      Style = tbsSeparator
    end
    object ToolButton6: TToolButton
      Left = 100
      Top = 2
      Action = ActionCut
    end
    object ToolButton7: TToolButton
      Left = 123
      Top = 2
      Action = ActionCopy
    end
    object ToolButton8: TToolButton
      Left = 146
      Top = 2
      Action = ActionPaste
    end
  end
  object MainMenu1: TMainMenu
    Images = ImageList1
    Left = 24
    Top = 128
    object File1: TMenuItem
      Caption = '&File'
      object New1: TMenuItem
        Action = ActionNew
      end
      object Open1: TMenuItem
        Action = ActionOpen
      end
      object Save2: TMenuItem
        Action = ActionSave
      end
      object Save1: TMenuItem
        Action = ActionSaveAs
      end
      object Close1: TMenuItem
        Action = ActionClose
      end
      object N1: TMenuItem
        Caption = '-'
      end
      object Exit1: TMenuItem
        Caption = '&Exit'
        OnClick = Exit1Click
      end
    end
    object Edit1: TMenuItem
      Caption = 'Edit'
      object Cut1: TMenuItem
        Action = ActionCut
      end
      object Copy1: TMenuItem
        Action = ActionCopy
      end
      object Paste1: TMenuItem
        Action = ActionPaste
      end
      object N2: TMenuItem
        Caption = '-'
      end
      object Font1: TMenuItem
        Action = ActionFont
      end
    end
    object Window1: TMenuItem
      Caption = '&Window'
      object Cascade1: TMenuItem
        Action = ActionCascade
      end
      object Tile2: TMenuItem
        Action = ActionTileVertical
      end
      object Tile1: TMenuItem
        Action = ActionTileHorizontal
      end
      object ArrangeIcons1: TMenuItem
        Action = ActionArrange
      end
      object MinimizeAll1: TMenuItem
        Action = ActionMinimizeAll
      end
    end
  end
  object ActionList1: TActionList
    Images = ImageList1
    Left = 24
    Top = 72
    object ActionArrange: TWindowArrange
      Category = 'Window'
      Caption = '&Arrange Icons'
    end
    object ActionCascade: TWindowCascade
      Category = 'Window'
      Caption = '&Cascade'
      ImageIndex = 17
    end
    object ActionClose: TWindowClose
      Category = 'Window'
      Caption = '&Close'
      ImageIndex = 3
    end
    object ActionMinimizeAll: TWindowMinimizeAll
      Category = 'Window'
      Caption = '&Minimize All'
    end
    object ActionTileHorizontal: TWindowTileHorizontal
      Category = 'Window'
      Caption = 'Tile &Horizontal'
      ImageIndex = 15
    end
    object ActionTileVertical: TWindowTileVertical
      Category = 'Window'
      Caption = 'Tile &Vertical'
      ImageIndex = 16
    end
    object ActionCopy: TEditCopy
      Category = 'Edit'
      Caption = '&Copy'
      Hint = 'Copy'
      ImageIndex = 1
      ShortCut = 16451
    end
    object ActionCut: TEditCut
      Category = 'Edit'
      Caption = 'Cu&t'
      Hint = 'Cut'
      ImageIndex = 0
      ShortCut = 16472
    end
    object ActionPaste: TEditPaste
      Category = 'Edit'
      Caption = '&Paste'
      Hint = 'Paste'
      ImageIndex = 2
      ShortCut = 16470
    end
    object ActionFont: TAction
      Category = 'Edit'
      Caption = '&Font...'
      ImageIndex = 7
      ShortCut = 16454
      OnExecute = ActionFontExecute
      OnUpdate = ActionFontUpdate
    end
    object ActionNew: TAction
      Category = 'File'
      Caption = '&New'
      ImageIndex = 4
      OnExecute = ActionNewExecute
    end
    object ActionOpen: TAction
      Category = 'File'
      Caption = '&Open...'
      ImageIndex = 5
      ShortCut = 16463
      OnExecute = ActionOpenExecute
    end
    object ActionSaveAs: TAction
      Category = 'File'
      Caption = 'Save &As...'
      OnExecute = ActionSaveAsExecute
      OnUpdate = ActionSaveAsUpdate
    end
    object ActionSave: TAction
      Category = 'File'
      Caption = '&Save'
      ImageIndex = 6
      ShortCut = 16467
      OnExecute = ActionSaveExecute
      OnUpdate = ActionSaveUpdate
    end
  end
  object FontDialog1: TFontDialog
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -11
    Font.Name = 'MS Sans Serif'
    Font.Style = []
    MinFontSize = 0
    MaxFontSize = 0
    Left = 96
    Top = 128
  end
  object OpenDialog1: TOpenDialog
    Filter = 'Text file (*.txt)|*.txt|Any file (*.*)|*.*'
    Options = [ofHideReadOnly, ofPathMustExist, ofFileMustExist, ofEnableSizing]
    Left = 176
    Top = 136
  end
  object SaveDialog1: TSaveDialog
    Filter = 'Text file (*.txt)|*.txt|Any file (*.*)|*.*'
    Options = [ofHideReadOnly, ofPathMustExist, ofEnableSizing]
    Left = 168
    Top = 80
  end
  object ImageList1: TImageList
    Left = 100
    Top = 76
    Bitmap = {
      494C010108000A00040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
      0000000000003600000028000000400000003000000001001000000000000018
      0000000000000000000000000000000000004A35AD21CE39AD1D21108410AA35
      0D39CE35CD1C4429AD35C839AE35270484104435AD21CE39AD198728AA350D39
      CE35ED0481108428AD35C839AE35E6104A35AD21CE39AD1D21108410AA350D39
      CE35CD1C4429AD35C839AE35270484104435AD21CE39AD198728AA350D39CE35
      ED0481108428AD35C839AE35E6104A35AD21CC31A831AD31E6104A318E218D35
      8D1D21108410C931CD1C4425AC39C931ED0481108428CC31E6102A31CD258E35
      270484100431AE354D318E1D4421CC35AD1D211084108A39CC1C4425AC39C931
      ED04811084248D312C35CE198728A9318C25CD39270484104435AD21CC198728
      AA350D31EE0481108428AD35C839AE35E610270484100435CD218D358D198728
      A8350E35AC35EC0481108424E6102A31CD258E35270484100435CD1987288935
      2E39AC1D211084108839AD35893987288839AD35270484100431AE352D39AC1D
      4421CC35AD1D211084108839AD358A390C3987288839AD35270484102439AC21
      8D358D198728C9310D35AC35EC0481108428CE1C4425AC39C931ED0481108420
      CE19872889352E39AC1D21108410A839CF1C4425AC39C931ED0481108428CC39
      CC1C4425AC39C931ED0481108420CC35AD21CD3D872888350E35EE1D21108410
      8839AD35C839872888350E39EE0481108420CC35AD29CC39EC100A31CD29CC39
      EC0481108420CC35AD21AD3987288839AD35AD35ED31A835270484100431AE35
      4D358D25CD35AF358E358728AA35AC39AA352C35AE3DAD39AC1D211084108839
      AD35AA354C31CE358C358728AA35AC39AA354C31CE358C352704841044358D19
      872889352E39AC1D21108410A8358E19872889352E39AC1D21108410A935AD35
      8F21AD19872889352E39AC1D2110841088358E358C25AC35CE1C4425AC39C931
      ED0481108420CC35AD25CD39E6100A31AE352D35CE1D211084108839AD35C839
      AC31EC104A358D350E398E358C1D211084108839AD3588398C31EC104A358D35
      0E318E318C1D211084108839AD35A8358E1D4429AD31CD21AD39EC0481108420
      CC35AD25AD35AD3D0C35ED104A358D352E352431AD25AC39E6102A31AD25AC39
      2704841044358D35CE1C4425AC39C931ED0481108424CC19872889352E39AC1D
      21108410A835CC1C4425AC39C931ED0481108424E6102A31CD258E3527048410
      043DCD19872889352E39AC1D2110841088398C31CC1C4425AC39C931ED048110
      8428AD31E6102A31CD258E35270484100439CD318E318C052104CE312E048428
      AD31CD3985208D398E3985208E39AD31AE10A839CD150435CD39AD3925048420
      AD35AC108935CE15443D4E39AD3985288E21CC35AE1088392D35CE150435AC35
      CC1524352C35CE1504350D39AE3925048428AD35AA3527042138CF3121104425
      AC35A8398D1C8435CC394521CD35250484101F00100000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000038AD390001A031270421341F00000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      00000000000000000000000000001F7C1F000042100000421000004210000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      000000000000000000000000000000001F00F07F1F42F07F1F42100000000000
      E07FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F1F000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000042100000421000004210001F7CFF7F1F42107C1F0000000000
      E07FFF7FFF7FFF7FFF7F1F40E07FFF7FFF7FFF7FFF7F1F000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      00000000000000000042F07F1F42F07F1F42FF7F1F42107CFF7F1F0000000000
      E07FFF7FFF7FFF7F1F400040E07FFF7FFF7FFF7FFF7F1F000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0063186318631863186318631863186318631800006318000000000000000000
      0000004210000000E07F1F42F07F1F7CFF7F1042F07F1F42107C1F0000000000
      E07FFF7FFF7F1F400040004000400040E07FFF7FFF7F1F000000000000000000
      E07FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F1F00000000000000
      0000000000000000000000000000000000000000000000631800000000000000
      0000004210421000E07F1F7C1F42F07F1F7CFF7F1F7CFF7F1F42100000000000
      E07FFF7FFF7FFF7F1F400040E07FFF7F1F40E07FFF7F1F000000000000000000
      E07FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F1F00000000000063
      18631863186318631863187C007C007C00631863180000000000000000000042
      10000042F07F1F00E07F1F42F07F1F4210420000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000420042000000000000
      0000000000000000000000000042000000000000000000000000000000000000
      000000000000000000000000000000000000000000000000FF7FFF7FFF7FFF7F
      FF7FFF7FFF7FFF7FFF7F00000000000000000000000000420042004200420042
      0042004200420042000000000000000000000000000000420042000000000000
      0000000000000000000000000042000000000000000000000000000000000000
      000000000000000000000000000000000000000000000000FF7FFF7FFF7FFF7F
      FF7FFF7FFF7FFF7FFF7F00000000000000000000E07F00000042004200420042
      0042004200420042004200000000000000000000000000420042000000000000
      0000000000000000000000000042000000000000000000000000000000001042
      000000000000000000000000000000000000000000000000FF7FFF7FFF7FFF7F
      FF7FFF7FFF7FFF7FFF7F00000000000000000000FF7FE07F0000004200420042
      0042004200420042004200420000000000000000000000420042000000000000
      0000000000000000000000000042000000000000000000000000000010420000
      000000000000000000001042000000000000000000000000FF7FFF7FFF7FFF7F
      FF7FFF7FFF7FFF7FFF7F00000000000000000000E07FFF7FE07F000000420042
      0042004200420042004200420042000000000000000000420042004200420042
      0042004200420042004200420042000000000000000000000000000000000000
      000000000000000000000000000000000000000000000000FF7FFF7FFF7FFF7F
      FF7FFF7FFF7FFF7FFF7F00000000000000000000FF7FE07FFF7FE07F00000000
      0000000000000000000000000000000000000000000000420042000000000000
      0000000000000000000000420042000000000000000000000000000000000000
      104200000000000000000000000000000000000000000000FF7FFF7FFF7FFF7F
      FF7FFF7FFF7FFF7FFF7F00000000000000000000E07FFF7FE07FFF7FE07FFF7F
      E07FFF7FE07F0000000000000000000000000000000000420000000000000000
      0000000000000000000000000042000000000000000000000000000000001042
      000000000000000010420000000000000000000000000000FF7FFF7FFF7FFF7F
      FF7FFF7FFF7FFF7FFF7F00000000000000000000FF7FE07FFF7FE07FFF7FE07F
      FF7FE07FFF7F0000000000000000000000000000000000420000000000000000
      0000000000000000000000000042000000000000000000000000000000000000
      000000000000000000000000000000000000000000000000FF7FFF7FFF7FFF7F
      FF7FFF7FFF7FFF7FFF7F00000000000000000000E07FFF7FE07F000000000000
      0000000000000000000000000000000000000000000000420000000000000000
      0000000000000000000000000042000000000000000000000000000000000000
      000000000000000000000000000000000000000000000000FF7FFF7FFF7FFF7F
      FF7FFF7F00000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000420000000000000000
      0000000000000000000000000042000000000000000000000000000000000000
      104200000000104200000000000000000000000000000000FF7FFF7FFF7FFF7F
      FF7FFF7F0000FF7F000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000420000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      000000000000000000000000000000000000000000000000FF7FFF7FFF7FFF7F
      FF7FFF7F00000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000420000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000010001000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000001000
      1000100010001000100010001000100010000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000100000000000
      1000000000001000100000000000000000000000000000000000000000000000
      1000100010001000100010001000100010000000000000000000000000001000
      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F10000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000100000000000
      1000000010000000000010000000000000000000000000000000000000000000
      1000FF7FFF7FFF7FFF7FFF7FFF7FFF7F10000000104200421042004210421000
      FF7F000000000000000000000000FF7F10000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000100000000000
      1000000010000000000010000000000000000000000000000000000000000000
      1000FF7F00000000000000000000FF7F10000000004210420042104200421000
      FF7FFF7FFF7FFF7FFF7FFF7FFF7FFF7F10000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000010001000
      1000000010000000000010000000000000000000000000000000000000000000
      1000FF7FFF7FFF7FFF7FFF7FFF7FFF7F10000000104200421042004210421000
      FF7F000000000000FF7F10001000100010000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      10000000100010001000000000000000000000000000FF7FFF7FFF7FFF7FFF7F
      1000FF7F00000000000000000000FF7F10000000004210420042104200421000
      FF7FFF7FFF7FFF7FFF7F1000FF7F100000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      10000000100000000000000000000000000000000000FF7F0000000000000000
      1000FF7FFF7FFF7FFF7FFF7FFF7FFF7F10000000104200421042004210421000
      FF7FFF7FFF7FFF7FFF7F10001000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      00000000000000000000000000000000000000000000FF7FFF7FFF7FFF7FFF7F
      1000FF7F00000000FF7F10001000100010000000004210420042104200421000
      1000100010001000100010000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      00000000000000000000000000000000000000000000FF7F0000000000000000
      1000FF7FFF7FFF7FFF7F1000FF7F100000000000104200421042004210420042
      1042004210420042104200420000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      00000000000000000000000000000000000000000000FF7FFF7FFF7FFF7FFF7F
      1000FF7FFF7FFF7FFF7F10001000000000000000004210420000000000000000
      0000000000000000104210420000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      00000000000000000000000000000000000000000000FF7F00000000FF7F0000
      1000100010001000100010000000000000000000104210420000000000000000
      0000000000000000104200420000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      00000000000000000000000000000000000000000000FF7FFF7FFF7FFF7F0000
      FF7F0000000000000000000000000000000000000042104200420000E07F0000
      0000E07F00001042004210420000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      00000000000000000000000000000000000000000000FF7FFF7FFF7FFF7F0000
      000000000000000000000000000000000000000000000000000000000000E07F
      E07F000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      000000000000000000000000000000000000424D3E000000000000003E000000
      2800000040000000300000000100010000000000800100000000000000000000
      000000000000000000000000FFFFFF0000000000000000C00000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFC001FFFF
      C007001F8031F183C007000F8031FBC7C00700078031F9C7C00700038001F807
      C00700018001FD8FC00700008001FC8FC007001F8FF1FC8FC007001F8FF1FE1F
      C007001F8FF1FE1FC0078FF18FF1FE1FC00FFFF98FF1FF3FC01FFF758FF5FF7F
      C03FFF8F8001FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9FFFFFFFC00FFFF
      F6CFFE008000EFFDF6B7FE000000C7FFF6B7FE000000C3FBF8B780000000E3F7
      FE8F80000001F1E7FE3F80000003F8CFFF7F80000003FC1FFE3F80010003FE3F
      FEBF80030003FC1FFC9F80070FC3F8CFFDDF807F0003E1E7FDDF80FF8007C3F3
      FDDF81FFF87FC7FDFFFFFFFFFFFFFFFF00000000000000000000000000000000
      000000000000}
  end
end
Child.dfm
object ChildForm: TChildForm
  Left = 266
  Top = 155
  Width = 473
  Height = 294
  Caption = 'MDI Child'
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  FormStyle = fsMDIChild
  OldCreateOrder = True
  Position = poDefault
  Visible = True
  OnClose = FormClose
  OnCloseQuery = FormCloseQuery
  OnCreate = FormCreate
  PixelsPerInch = 96
  TextHeight = 13
  object Memo1: TMemo
    Left = 0
    Top = 0
    Width = 465
    Height = 267
    Align = alClient
    TabOrder = 0
    OnChange = Memo1Change
  end
end