home *** CD-ROM | disk | FTP | other *** search
/ Delphi 4 Bible / Delphi_4_Bible_Tom_Swan_IDG_Books_1998.iso / source / MDIDEMO / CHILD.PAS < prev    next >
Pascal/Delphi Source File  |  1998-03-12  |  917b  |  47 lines

  1. unit Child;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls,
  7.   Forms, Dialogs;
  8.  
  9. type
  10.   TChildForm = class(TForm)
  11.     procedure FormClose(Sender: TObject;
  12.       var Action: TCloseAction);
  13.   private
  14.   {- Private declarations }
  15.   public
  16.   {- Public declarations }
  17.     procedure LoadData(const FileName: String); virtual;
  18.     procedure SaveData(const FileName: String); virtual;
  19.   end;
  20.  
  21. var
  22.   ChildForm: TChildForm;
  23.  
  24. implementation
  25.  
  26. {$R *.DFM}
  27.  
  28. procedure TChildForm.FormClose(Sender: TObject;
  29.   var Action: TCloseAction);
  30. begin
  31.   Action := caFree;
  32. end;
  33.  
  34. procedure TChildForm.LoadData(const FileName: String);
  35. begin
  36.   ShowMessage('LoadData from ' + FileName);
  37.   Caption := LowerCase(FileName);
  38. end;
  39.  
  40. procedure TChildForm.SaveData(const FileName: String);
  41. begin
  42.   ShowMessage('SaveData to ' + FileName);
  43.   Caption := LowerCase(FileName);
  44. end;
  45.  
  46. end.
  47.