var MyFrame : TFrame; begin MyFrame := TFrame.Create(Self); MyFrame.Parent := Form1; TreeView1.Parent := MyFrame; end;