B
bz0108
Unregistered / Unconfirmed
GUEST, unregistred user!
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Menus;
type
TMainForm = class(TForm)
MainMenu1: TMainMenu;
file1: TMenuItem;
new1: TMenuItem;
open1: TMenuItem;
save1: TMenuItem;
close1: TMenuItem;
exit1: TMenuItem;
edit1: TMenuItem;
copy1: TMenuItem;
cut1: TMenuItem;
paste1: TMenuItem;
windows1: TMenuItem;
cascade1: TMenuItem;
tilehorizontal1: TMenuItem;
tilevertical1: TMenuItem;
arrangeicons1: TMenuItem;
OpenDialog1: TOpenDialog;
SaveDialog1: TSaveDialog;
procedure open1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
MainForm: TMainForm;
implementation
uses Childform;
{$R *.DFM}
var
child:TMdiChild;
procedure TMainForm.open1Click(Sender: TObject);
var
Child:TMdiChild;
sFile:Sting;
begin
Dhild:=TMdichild.Creat(Application);
Child.Caption:=Child.name;
OpenDialog1.Title:='open';
OpenDialog1.Filter:='All Files(*.*)|*.*';
OpenDialog1.Execute();
if OpneDialog1.FileName<>'' then
begin
sFile:=OpenDialog1.Filename;
Child.Memo.Lines.LoadFromFile(sFile);
Child.Caption:=sFile;
end;
Child.Memo.Lines.LoadFromFile(sFile);
Child.Caption:=sFile;
end;
end.
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Menus;
type
TMainForm = class(TForm)
MainMenu1: TMainMenu;
file1: TMenuItem;
new1: TMenuItem;
open1: TMenuItem;
save1: TMenuItem;
close1: TMenuItem;
exit1: TMenuItem;
edit1: TMenuItem;
copy1: TMenuItem;
cut1: TMenuItem;
paste1: TMenuItem;
windows1: TMenuItem;
cascade1: TMenuItem;
tilehorizontal1: TMenuItem;
tilevertical1: TMenuItem;
arrangeicons1: TMenuItem;
OpenDialog1: TOpenDialog;
SaveDialog1: TSaveDialog;
procedure open1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
MainForm: TMainForm;
implementation
uses Childform;
{$R *.DFM}
var
child:TMdiChild;
procedure TMainForm.open1Click(Sender: TObject);
var
Child:TMdiChild;
sFile:Sting;
begin
Dhild:=TMdichild.Creat(Application);
Child.Caption:=Child.name;
OpenDialog1.Title:='open';
OpenDialog1.Filter:='All Files(*.*)|*.*';
OpenDialog1.Execute();
if OpneDialog1.FileName<>'' then
begin
sFile:=OpenDialog1.Filename;
Child.Memo.Lines.LoadFromFile(sFile);
Child.Caption:=sFile;
end;
Child.Memo.Lines.LoadFromFile(sFile);
Child.Caption:=sFile;
end;
end.