rincewind666
asked on
Saving/loading MDI forms
I am trying to create a MDI application. Here's what I've got so far:
procedure TForm1.NewItemClick(Sender : TObject);
var
Child: TPage;
begin
{ New Child }
Inc(Count);
Child := TPage.Create(Self);
Child.Caption := Child.Caption + ' ' + IntToStr(Count);
end;
I need to know how to:
1. Save the current page.
2. Save all the pages.
3. Load a file.
Any help would be greatly appreciated. I am giving the maximum 500 points for this as it is URGENT. I am using Delphi 6.
procedure TForm1.NewItemClick(Sender
var
Child: TPage;
begin
{ New Child }
Inc(Count);
Child := TPage.Create(Self);
Child.Caption := Child.Caption + ' ' + IntToStr(Count);
end;
I need to know how to:
1. Save the current page.
2. Save all the pages.
3. Load a file.
Any help would be greatly appreciated. I am giving the maximum 500 points for this as it is URGENT. I am using Delphi 6.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Many thanks for your help.
for i := 0 to MDIForm.MDIChildCount - 1 do
begin
listbox1.add(MDIForm.MDICh
end;
you can access the components on the child form with
var
DataFromOtherForm:String;
with (MDIForm.MDIChildren[I] as TMDIChildForm).Edit1 do
DataFromOtherForm := Text;
Kunfu Faresi