"TForm(AOwner)=TForm.Create(AOwner)"?

Hi!in the code[code]constructor TOpenGL.Create(AOwner: TComponent);var frm: Tform;{some code}frm:= TForm(AOwner);{some code}[/code]I just made a guess that "TForm(AOwner=TForm.Create(AOwner)". Is it true? If not, what does it mean?

: There is another similar place in the code.: [code]: with TWinControl(Owner) do: begin: {some code}: end;: [/code]: This call is in the definition of a method of a decendent(self defined) of TComponent.: : Is it the same thing as "TForm(AOwner)"?: : Thank you!: : Check out the Owner property and the with statement in the help files. In this case the owner needs to be type-cast as a TWinControl to access some of its methods and properties.As for your previous question: The code is not the same as you put it, because the owner of an component is usually the form on which it is placed, while the owner of the forms itself is usually the application; and type-casting a TApplication object as a TForm will result in an error (Check the hierarchy of the TApplication and TForm objects).Note: you cannot type-cast the left side of an assignment.