参数为AOwner: TComponent。
也就是指定所有者,对其释放负责。
一般来说Form是其上所有控件的所有者,而Application是它的Form的所有者。

解决方案 »

  1.   

    if (Param is Form or Self) then 
    begin
      Form.InsertControl(You TObject);
      Form.Components[last]:=you insert Tojbect
      and Form.ComponentCount+1;
    end else
    begin
      Application.ComponenctCount+1;
      //同上不过是Application对像
    end else
    begin
     这个对像是没有Parent.
     但一样可用。
    end; 
      
      

  2.   

    if (Param is Form or Self) then 
    begin
      Form.InsertControl(You TObject);
      Form.Components[last]:=you insert Tojbect
      and Form.ComponentCount+1;
    end else
    begin
      Application.ComponenctCount+1;
      //同上不过是Application对像
    end else
    begin
     这个对像是没有Parent.
     但一样可用。
    end;