What does "dont not work" mean?
It is always possible to change the Parent of a control at runtime like you do. A problem could be that the control keeps its positional values (Left, Top) in the new parent and considers them to be relative to the new parent - of course. So, when you change the parent of a control which sits at the right of a wide form to move it into a narrower panel, the control will be out of the bounds of its parent now and not be visible - although it's there.
The attached demo contains two buttons which toggle their parent between the form and the panel with each click. No problem with the left button which nicely moves between both containers. Clicking the right button, however, moves it outside the bounds of the panel - increase the width of the form, and you will see it appearing at the right side.
This behaviour is different from Delphi which keeps re-parented controls always inside the new container.