我做了一个第三方控件,注册后如何改变它注册后在面板上的图标?

解决方案 »

  1.   

    用Delphi自带的Image Editor新建一个 dcr 文件,New一个32*32的Bitmap,名字为控件的类名,保存后把dcr文件添加到 dpk 中再安装即可。
      

  2.   

    unit testobj;interface
    uses
      Windows, Messages, SysUtils, Classes, Controls, Forms, Graphics;
    type
    ttestobj= class(tcomponent)
    private
      fmypro: string;
    published
      property mypro: string read fmypro write fmypro;end;
    procedure Register;
    implementation
    procedure Register;
    begin
      RegisterComponents('cdl', [Ttestobj]);
    end;
    end.
      

  3.   

    你建立的BITMAP名字要为 ttestobj .