You must create a new frame (FRAME2) with the same code that you used to create the first (FRAME1); And later you have to create the whole component included (created at runtime) inside FRAME1 on FRAME2.
To do this, use:
for i := 0 to (FRAME1.ComponentCount - 1) do
...
cmp := TComponent(FRAME1.Component[i]);
... create cmp on Frame2
You can try the second alternative; Save FRAME1 with TMemoryStream (SaveComponent), and then create a new frame and extract the saved information in Stream (I don't have a test of this option).
Sincerely.
source
share