在DLL中进行如下操作
定义 Image:TImage;创建 Image:=TImage.Create(Self);Build时,出错:'Self' is unknown identifier.高手指教!

解决方案 »

  1.   

    把你的Self换成一个具体的Component及其后代的实例,或者干脆用nil指针(只不过你要确保能够手工Free Image对象)。
    Self只在方法实现体内有效。
      

  2.   

    Image:=TImage.Create(nil);
    ...
    image.free;  //要注意释放
      

  3.   

    有没有搞错啊self是在类里面用的根dll有什么关系?
      

  4.   

    Self表示自己所在的类名
    如在TForm中指的就是Tform