在delphi里,我如何定义CMBCHINALib_TLB组件,在哪里定义呢

解决方案 »

  1.   

    出错信息是这样的,[Fatal Error] mainform.pas(8): File not found: 'CMBCHINALib_TLB.dcu'能帮我分析一下吗?
      

  2.   

    unit CMBCHINALib_TLB;interfaceuses
      Windows, Messages, SysUtils, Classes, Controls, StdCtrls;type
      CMBCHINALib_TLB = class(...)
      private
        { Private declarations }
      protected
        { Protected declarations }
      public
        { Public declarations }
      published
        { Published declarations }
      end;procedure Register;implementationprocedure Register;
    begin
      RegisterComponents('..', [CMBCHINALib_TLB]);
    end;end.
      

  3.   

    首先要清空原来的Form。
        然后
        Component(组件)---New Component--启动Component Wizard
        或File--New--Other--Component(黄色齿轮的图标)
    也可以启动Component Wizard。
        Component Wizard需要如下信息:
        Ancestor type:我们想继承的父类名称(这里为TComboBox);
                       注意一下,一般同名的基类,Q开头的是CLX构件,
                       另一个是VCL构件。                  
        Class Name:正在建立的组建类名称(这里为TMd4FontCombo);
        Palette Page:组件放置的页面(这里建立的一个新的页面Md4);
        Unit File Name:放置源代码的文件名(这里为Md4FontBox)
        最后为当前搜索路径,请使用默认值。
        Ok   (另一个Install是立刻在组建包中安装组件)
        这就得到了一个简单的Pascal源文件:
      

  4.   

    把TMd4FontCombo换为CMBCHINALib_TLB就可以得到上边的pas
      

  5.   

    tsst(田sir) :
    你好!是不是将Class Name:TMd4FontCombo改为Class Name:CMBCHINALib_TLB呢????