procedure TFMain.FormMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); var i : Integer; LabelCount : Integer; NewLabel : TLabel; begin LabelCount := 0; for i := 0 to FMain.ComponentCount-1 do begin if FMain.Components[i] is TLabel then Inc( LabelCount); end; NewLabel := TLabel.Create( FMain); NewLabel.Caption := 'Label' + IntToStr( LabelCount+1); NewLabel.Top := Y; NewLabel.Left := X; NewLabel.Parent := FMain; NewLabel.Show; end;