1、先生成两个类,一个是TCollection的后代,一个是TCollectionItem的后代;
   (可以被开发平台直接设计)
   如:(Delphi中)  TGSProtMaps = class(TCollection)
  private
    FOwner: TGSProtMapper;
    function  GetItem(Index: Integer): TGSProtMap;
    procedure SetItem(Index: Integer; Value: TGSProtMap);
  protected
    function  GetOwner: TPersistent; override;
  public
    constructor Create(AOwner: TGSProtMapper);
    function  Add: TGSProtMap;
    function  Insert(Index: Integer): TGSProtMap;
    property  Owner: TGSProtMapper read FOwner;
    property  Items[Index: Integer]: TGSProtMap read GetItem write SetItem; default;
  end;  TGSProtMap = class(TCollectionItem)
  private
    { Private declarations }
  protected
    function  GetDisplayName: string; override;
    procedure SetDisplayName(const Value: string); override;
    { Protected declarations }
  public
    constructor Create(Collection: TCollection); override;
    destructor  Destroy; override;
  end;   然后生成一个TComponent(可以在设计时出现),包含新的TCollection后代的属性。   如:(Delphi中)  TGSProtMapper = class(TComponent)
  private
    FMaps: TGSProtMaps;
    procedure SetMaps(const Value: TGSProtMaps);
  published
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;
    property Items: TGSProtMaps read FMaps write SetMaps;
  end;

解决方案 »

  1.   

    2、有两个Form,Form1是主Form,执行:    Form2.Parent:= Form1;
        Form2.Show;
      

  2.   

    附:Delphi 跟 C# 相近,就将就着吧。
      

  3.   

    1. indexer对英语Item,如果要进一步模仿的话,实现:IList、IEnumerable、ICollection。
      

  4.   

    谢Leonardo263090
    Form2.Parent := Form1;的方法不行,偶已经试过了。
      

  5.   

    也谢qqchen97
    能把你说的在略微具体一点吗?