Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 182401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:55:59+00:00 2026-05-11T14:55:59+00:00

Please explain the difference between: ChildForm := TForm.CreateParented(AOwner) ChildForm := TForm.CreateParentedControl(AOwner) ChildForm := TForm.Create(AOwner);

  • 0

Please explain the difference between:

ChildForm := TForm.CreateParented(AOwner)  ChildForm := TForm.CreateParentedControl(AOwner)  ChildForm := TForm.Create(AOwner);  ChildForm.ParentWindow := AOwner.Handle  

This example may be complicated and convoluted, I’d really just like an overview of when people use the different kinds of Create methods for forms.

Delphi 7 help tells me that I should use CreateParented(AOwner.Handle) and ParentWindow := AOwner.handle with non-VCL controls or across DLL’s. Until yesterday I just set Parent := AOwner, and I have absolutely no idea why this stopped working.

(Maybe I just need to reboot my computer)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T14:56:00+00:00Added an answer on May 11, 2026 at 2:56 pm

    We have Components. They are visible or invisible items on a form or a datamodule. Each component can have an owner that is responsible for the eventual destruction. If there is no owner, you must take care of the destruction yourself.

    We have Controls, which are components that are visible. They also have a Parent which contains the control. For example a Panel is the parent of a button on that panel.

    We also have WinControls which are controls that link to windows objects. They also have a handle of the parent window.

    So:

    1. TMyControl.CreateParented constructor CreateParented(ParentWindow: HWnd);

      This is used to create a control from which the parent window is provided by an handle. It creates the control without owner and sets the parentwindow to ParentWindow.

    2. TMyControl.CreateParentedControl class function CreateParentedControl(ParentWindow: HWND): TWinControl;

      Creates the control, without owner, sets the parentwindow to ParentWindow and returns it.

    3. TMyControl.Create(AOwner: TComponent)

      Creates a control with owner set to AOwner.

    4. TMyControl.ParentWindow := AOwner.Handle;

      Sets the parentwindow (handle) to the handle of AOwner.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 212k
  • Answers 212k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer One answer to this question could be Microsoft Sharepoint but… May 12, 2026 at 10:21 pm
  • Editorial Team
    Editorial Team added an answer Account() factory class that returns an AccountIndividual() or AccountCompany() instance.… May 12, 2026 at 10:21 pm
  • Editorial Team
    Editorial Team added an answer You can't cast because they are different types. You have… May 12, 2026 at 10:21 pm

Related Questions

Can someone please explain the difference between the protected and protected internal modifiers in
can someone please explain the difference between these 2 pieces of code: var temp
Can you please explain the difference between explicit and implicit type casts?
I am new to JavaScript OOP. Can you please explain the difference between the

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.