home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Delphi 4 Bible
/
Delphi_4_Bible_Tom_Swan_IDG_Books_1998.iso
/
source
/
Mdidemo2
/
child.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1998-03-12
|
1KB
|
50 lines
unit Child;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls,
Forms, Dialogs, StdCtrls;
type
TChildForm = class(TForm)
Memo1: TMemo;
procedure FormClose(Sender: TObject;
var Action: TCloseAction);
private
{- Private declarations }
public
{- Public declarations }
procedure LoadData(const FileName: String); virtual;
procedure SaveData(const FileName: String); virtual;
end;
var
ChildForm: TChildForm;
implementation
{$R *.DFM}
procedure TChildForm.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
Action := caFree;
end;
procedure TChildForm.LoadData(const FileName: String);
begin
// ShowMessage('LoadData from ' + FileName);
Memo1.Lines.LoadFromFile(FileName);
Caption := LowerCase(FileName);
end;
procedure TChildForm.SaveData(const FileName: String);
begin
// ShowMessage('SaveData to ' + FileName);
Memo1.Lines.SaveToFile(FileName);
Caption := LowerCase(FileName);
end;
end.