把Frames从TForm.Components和Controls属性中去掉。

解决方案 »

  1.   

    可能我没有搞清楚你说的frames是什么,是TFrame对象吗?如果是的话用TComponent.InsertComponent方法啊,如:Application.InsertComponent,把他们移到Application下拥有。另外设置一下Parent为nil。TComponent.InsertComponent
    Establishes the component as the owner of a specified component.procedure InsertComponent(AComponent: TComponent);DescriptionInsertComponent adds the component passed in the AComponent parameter to the end of the Components array property. The inserted component must have no name (no specified Name property value), or the name must be unique among all others in the Components list.When the owning component is destroyed, AComponent is destroyed also.Components are automatically inserted and removed when visually manipulating them in the form designer. Use InsertComponent when manually adding components to another Owner component's Components list.