How to avoid issues when embedding a TForm in another TForm?
问题 I often embed a TForm descendant into another TForm descendant like this: var Form1: TForm1; Form2: TForm2; begin Form2.Parent := Form1; Form2.BorderStyle := bsNone; Form2.Align := alClient; Form2.Show; end; Usually this works just fine, but sometimes the controls in Form2 are not aligned properly. Is there a general workaround for this sort of problem? Does anybody know what is causing this "misalignment"? I know that I could use TFrame for this kind of job, but I have a lot of library code