怎么把C++Builder
__classid(TForm)
转成Delphi

解决方案 »

  1.   

    支持一下,一样的名字。
    不过我的注册名更好。 yeeyee
      

  2.   

    BCB:
    //---------------------------------------------------------------------------#ifndef Unit1H
    #define Unit1H
    //---------------------------------------------------------------------------
    #include <Classes.hpp>
    #include <Controls.hpp>
    #include <StdCtrls.hpp>
    #include <Forms.hpp>
    //---------------------------------------------------------------------------
    class TForm1 : public TForm
    {
    __published: // IDE-managed Components
    private: // User declarations
    public: // User declarations
        __fastcall TForm1(TComponent* Owner);
    };
    //---------------------------------------------------------------------------
    extern PACKAGE TForm1 *Form1;
    //---------------------------------------------------------------------------
    #endif
    delphi:
    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs;type
      TForm1 = class(TForm)
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form1: TForm1;implementation{$R *.dfm}end.
      

  3.   

    class TMYCollection: public TCollectionItem;class TYCollections: public TCollection;tmp = new TMYCollections(sCon, __classid(TMYCollection));
      

  4.   

    tmp = TMYCollections(sCon, TMYCollection);
      

  5.   

    错了,是
    tmp = TMYCollections.Create(sCon, TMYCollection);