To have the main window create the child window

1 â–  Choose Project ^ Options

The Project Options dialog displays.

  1. Select frChild from Auto-create forms: list and click the right-angle button to move it to the Available forms: list and click OK.
  2. Select the frMain form to activate it; then switch to the Code view.
  3. Scroll to the uses section and add uChild to the list.
  4. Scroll to the private declarations section and enter this procedure declaration:

procedure CreateChildForm(const childName: string);

6. Scroll to the implementation section, and enter the code below:

procedure TfrMain.CreateChildForm (const childName: string); var Child: TfrChild; begin

Child := TfrChild.Create(Application); Child.Caption := childName; end;

Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook


Post a comment