Sample code for Delphi 1 bug #17 {******** DFM *********) object Form1: TForm1 Left = 166 Top = 108 Width = 309 Height = 191 Caption = 'Form1' Font.Color = clWindowText Font.Height = -13 Font.Name = 'System' Font.Style = [] PixelsPerInch = 96 Position = poScreenCenter OnShow = FormShow TextHeight = 16 object BitBtn1: TBitBtn Left = 96 Top = 108 Width = 89 Height = 33 TabOrder = 0 Kind = bkClose end end {******** PAS *********) unit Unit1; interface uses SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Buttons, ExtCtrls; type TForm1 = class(TForm) BitBtn1: TBitBtn; procedure FormShow(Sender: TObject); private { Private declarations } public { Public declarations } Shape1, Shape2 :TShape; end; var Form1: TForm1; implementation {$R *.DFM} procedure TForm1.FormShow(Sender: TObject); begin Shape1:=TShape.Create(Self); Shape2:=TShape.Create(Shape1); Shape2.Left:=100; Shape2.Parent:=Self; Shape1.Parent:=Self; end; end.