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 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 = {
      494C010108000A00040010001000FFFFFFFFFF00FFFFFFFFFFFFFFFF424D3600
      0000000000003600000028000000400000003000000001001800000000000024
      00000000000000000000000000000000000054546F6F6C427574746F6E3B0D0A
      20202020546F6F6C427574746F6E323A2054546F6F6C427574746F6E3B0D0A20
      202020546F6F6C427574746F6E333A2054546F6F6C427574746F6E3B0D0A2020
      2020546F6F6C427574746F6E343A2054546F6F6C427574746F6E3B0D0A202020
      20546F6F6C427574746F6E353A2054546F6F6C427574746F6E3B0D0A20202020
      546F6F6C427574746F6E363A2054546F6F6C427574746F6E3B0D0A2020202054
      6F6F6C427574746F6E373A2054546F6F6C426176654469616C6F67313A205453
      6176654469616C6F673B0D0A202020204F70656E313A20544D656E754974656D
      3B0D0A2020202053617665313A20544D656E754974656D3B0D0A202020204163
      74696F6E536176653A2054416374696F6E3B0D0A2020202053617665323A2054
      4D656E754974656D3B0D0A20202020496D6167654C697374313A2054496D6167
      654C6973743B0D0A20202020546F6F6C426172313A2054546F6F6C4261723B0D
      0A20202020546F6F6C427574746F6E313A203B0D0A20202020466F6E74446961
      6C6F67313A2054466F6E744469616C6F673B0D0A202020204E323A20544D656E
      754974656D3B0D0A20202020466F6E74313A20544D656E754974656D3B0D0A20
      202020416374696F6E4E65773A2054416374696F6E3B0D0A2020202041637469
      6F6E4F70656E3A2054416374696F6E3B0D0A20202020416374696F6E53617665
      41733A2054416374696F6E3B0D0A202020204F70656E4469616C6F67313A2054
      4F70656E4469616C6F673B0D0A202020205374313A20544D656E754974656D3B
      0D0A20202020437574313A20544D656E754974656D3B0D0A20202020436F7079
      313A20544D656E754974656D3B0D0A202020205061737465313A20544D656E75
      4974656D3B0D0A20202020416374696F6E436F70793A205445646974436F7079
      3B0D0A20202020416374696F6E4375743A2054456469744375743B0D0A202020
      20416374696F6E50617374653A20544564697450617374653B0D0A2020202041
      6374696F6E466F6E743A2054416374696F6E6E696D697A65416C6C3B0D0A2020
      2020416374696F6E54696C65486F72697A6F6E74616C3A205457696E646F7754
      696C65486F72697A6F6E74616C3B0D0A20202020416374696F6E54696C655665
      72746963616C3A205457696E646F7754696C65566572746963616C3B0D0A2020
      202054696C65323A20544D656E754974656D3B0D0A20202020436C6F7365313A
      20544D656E754974656D3B0D0A202020204D696E696D697A65416C6C313A2054
      4D656E754974656D3B0D0A2020202045646972616E676549636F6E73313A2054
      4D656E754974656D3B0D0A20202020416374696F6E4C697374313A2054416374
      696F6E4C6973743B0D0A20202020416374696F6E417272616E67653A20545769
      6E646F77417272616E67653B0D0A20202020416374696F6E436173636164653A
      205457696E646F77436173636164653B0D0A20202020416374696F6E436C6F73
      653A205457696E646F77436C6F73653B0D0A20202020416374696F6E4D696E69
      6D697A65416C6C3A205457696E646F774D69204D61696E4D656E75313A20544D
      61696E4D656E753B0D0A2020202057696E646F77313A20544D656E754974656D
      3B0D0A202020204E6577313A20544D656E754974656D3B0D0A2020202046696C
      65313A20544D656E754974656D3B0D0A202020204E313A20544D656E75497465
      6D3B0D0A2020202045786974313A20544D656E754974656D3B0D0A2020202043
      617363616465313A20544D656E754974656D3B0D0A2020202054696C65313A20
      544D656E754974656D3B0D0A2020202041726E746572666163650D0A0D0A7573
      65730D0A202057696E646F77732C20436C61737365732C204772617068696373
      2C20466F726D732C20436F6E74726F6C732C0D0A20204368696C642C204D656E
      75732C205379735574696C732C205374644163746E732C204163746E4C697374
      2C204469616C6F67732C20496D674C6973742C20436F6D4374726C732C0D0A20
      20546F6F6C57696E3B0D0A0D0A747970650D0A2020544D61696E466F726D203D
      20636C6173732854466F726D290D0A202020FF00008000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000756E6974044000006D653B0D0A0D0A69FF00000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      000000000000000000000000FF00FFFF00000080808000000080808000000080
      8080000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      000000000000000000000000000000FF000080FFFFFF808080FFFFFF80808000
      0000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
      FFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      008080800000008080800000008080800000FF00FFFFFFFFFF80808000FFFF00
      0000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF008000FFFFFFFFFFFF
      FFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      00000000808080FFFFFF808080FFFFFF8080FFFFFFFF80808000FFFFFFFFFF00
      0000000000000000FFFFFFFFFFFFFFFFFFFFFFFF008000008000FFFFFFFFFFFF
      FFFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0
      C0C0C0000000C0C0C00000000000000000000000000000000000008080800000
      00000000FFFFFF808080FFFFFF00FFFFFFFF80808080FFFFFF80808000FFFF00
      0000000000000000FFFFFFFFFFFFFFFFFF008000008000008000008000008000
      FFFFFFFFFFFFFFFFFF000000000000000000000000000000FFFFFFFFFFFFFFFF
      FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000
      0000000000000000000000000000000000000000000000000000000000000000
      000000000000000000C0C0C00000000000000000000000000000008080808080
      80000000FFFFFF00FFFF808080FFFFFF00FFFFFFFFFF00FFFFFFFFFF80808000
      0000000000000000FFFFFFFFFFFFFFFFFFFFFFFF008000008000FFFFFFFFFFFF
      008000FFFFFFFFFFFF000000000000000000000000000000FFFFFFFFFFFFFFFF
      FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000
      0000000000C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C000FF0000FF0000FF00
      C0C0C0C0C0C0000000000000000000000000000000808080000000808080FFFF
      FF000000FFFFFF808080FFFFFF80808080800000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000080800080800000
      0000000000000000000000000000000000000000000000000000808000000000
      0000000000000000000000000000000000000000000000000000000000000000
      000000000000000000000000000000000000000000000000000000FFFFFFFFFF
      FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000
      0000000000000000008080008080008080008080008080008080008080008080
      0080800000000000000000000000000000000000000000000080800080800000
      0000000000000000000000000000000000000000000000000000808000000000
      0000000000000000000000000000000000000000000000000000000000000000
      000000000000000000000000000000000000000000000000000000FFFFFFFFFF
      FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000
      000000000000FFFF000000008080008080008080008080008080008080008080
      0080800080800000000000000000000000000000000000000080800080800000
      0000000000000000000000000000000000000000000000000000808000000000
      0000000000000000000000000000000000000000808080000000000000000000
      000000000000000000000000000000000000000000000000000000FFFFFFFFFF
      FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000
      0000000000FFFFFF00FFFF000000008080008080008080008080008080008080
      0080800080800080800000000000000000000000000000000080800080800000
      0000000000000000000000000000000000000000000000000000808000000000
      0000000000000000000000000000000000808080000000000000000000000000
      000000000000808080000000000000000000000000000000000000FFFFFFFFFF
      FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000
      000000000000FFFFFFFFFF00FFFF000000008080008080008080008080008080
      0080800080800080800080800000000000000000000000000080800080800080
      8000808000808000808000808000808000808000808000808000808000000000
      0000000000000000000000000000000000000000000000000000000000000000
      000000000000000000000000000000000000000000000000000000FFFFFFFFFF
      FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000
      0000000000FFFFFF00FFFFFFFFFF00FFFF000000000000000000000000000000
      0000000000000000000000000000000000000000000000000080800080800000
      0000000000000000000000000000000000000000000000808000808000000000
      0000000000000000000000000000000000000000000000808080000000000000
      000000000000000000000000000000000000000000000000000000FFFFFFFFFF
      FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000
      000000000000FFFFFFFFFF00FFFFFFFFFF00FFFFFFFFFF00FFFFFFFFFF00FFFF
      0000000000000000000000000000000000000000000000000080800000000000
      0000000000000000000000000000000000000000000000000000808000000000
      0000000000000000000000000000000000000000808080000000000000000000
      000000808080000000000000000000000000000000000000000000FFFFFFFFFF
      FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000
      0000000000FFFFFF00FFFFFFFFFF00FFFFFFFFFF00FFFFFFFFFF00FFFFFFFFFF
      0000000000000000000000000000000000000000000000000080800000000000
      0000000000000000000000000000000000000000000000000000808000000000
      0000000000000000000000000000000000000000000000000000000000000000
      000000000000000000000000000000000000000000000000000000FFFFFFFFFF
      FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000
      000000000000FFFFFFFFFF00FFFF000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000080800000000000
      0000000000000000000000000000000000000000000000000000808000000000
      0000000000000000000000000000000000000000000000000000000000000000
      000000000000000000000000000000000000000000000000000000FFFFFFFFFF
      FFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000080800000000000
      0000000000000000000000000000000000000000000000000000808000000000
      0000000000000000000000000000000000000000000000808080000000000000
      808080000000000000000000000000000000000000000000000000FFFFFFFFFF
      FFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFF00000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000080800000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      000000000000000000000000000000000000000000000000000000FFFFFFFFFF
      FFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000080800000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0080000080000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000080000080000080000080000080000080000080000080000080000080
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000008000
      0000000000000080000000000000000080000080000000000000000000000000
      0000000000000000000000000000000000000000000000800000800000800000
      8000008000008000008000008000008000000000000000000000000000000000
      00000000800000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF80
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000008000
      0000000000000080000000000080000000000000000080000000000000000000
      0000000000000000000000000000000000000000000000800000FFFFFFFFFFFF
      FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF8000000000008080800080808080800080
      80808080800000FFFFFF000000000000000000000000000000000000FFFFFF80
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000008000
      0000000000000080000000000080000000000000000080000000000000000000
      0000000000000000000000000000000000000000000000800000FFFFFF000000
      000000000000000000000000FFFFFF8000000000000080808080800080808080
      80008080800000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF80
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0080000080000080000000000080000000000000000080000000000000000000
      0000000000000000000000000000000000000000000000800000FFFFFFFFFFFF
      FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF8000000000008080800080808080800080
      80808080800000FFFFFF000000000000000000FFFFFF80000080000080000080
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000080000000000080000080000080000000000000000000000000
      0000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF800000FFFFFF000000
      000000000000000000000000FFFFFF8000000000000080808080800080808080
      80008080800000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF800000FFFFFF80000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000080000000000080000000000000000000000000000000000000
      0000000000000000FFFFFF000000000000000000000000800000FFFFFFFFFFFF
      FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF8000000000008080800080808080800080
      80808080800000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF80000080000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF800000FFFFFF000000
      000000FFFFFF8000008000008000008000000000000080808080800080808080
      8000808080000080000080000080000080000080000080000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000FFFFFF000000000000000000000000800000FFFFFFFFFFFF
      FFFFFFFFFFFF800000FFFFFF8000000000000000008080800080808080800080
      8080808000808080808000808080808000808080808000808000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF800000FFFFFFFFFFFF
      FFFFFFFFFFFF8000008000000000000000000000000080808080800000000000
      0000000000000000000000000000000000000080808080808000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000FFFFFF000000000000FFFFFF000000800000800000800000
      8000008000008000000000000000000000000000008080808080800000000000
      0000000000000000000000000000000000000080808000808000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000FFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFF000000000000
      0000000000000000000000000000000000000000000080808080800080800000
      0000FFFF00000000000000FFFF00000080808000808080808000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000FFFF00FFFF00000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      000000000000000000000000000000000000424D3E000000000000003E000000
      2800000040000000300000000100010000000000800100000000000000000000
      000000000000000000000000FFFFFF0000000000000000C00000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      0000000000000000000000000000000000000000000000000000000000000000
      00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFC001FFFF
      C007001F8031F183C007000F8031FBC7C00700078031F9C7C00700038001F807
      C00700018001FD8FC00700008001FC8FC007001F8FF1FC8FC007001F8FF1FE1F
      C007001F8FF1FE1FC0078FF18FF1FE1FC00FFFF98FF1FF3FC01FFF758FF5FF7F
      C03FFF8F8001FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9FFFFFFFC00FFFF
      F6CFFE008000EFFDF6B7FE000000C7FFF6B7FE000000C3FBF8B780000000E3F7
      FE8F80000001F1E7FE3F80000003F8CFFF7F80000003FC1FFE3F80010003FE3F
      FEBF80030003FC1FFC9F80070FC3F8CFFDDF807F0003E1E7FDDF80FF8007C3F3
      FDDF81FFF87FC7FDFFFFFFFFFFFFFFFF}
  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