unit MNewPanel;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls;
type
NewPanel= class(Tpanel)
MainImg : Timage;
private
{ Private declarations }
public
{ Public declarations }
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
end;
implementation
{ newclass }
constructor NewPanel.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
MainImg := TImage.Create(nil);
MainImg.Parent := Self;
MainImg.Width := Self.Width;
MainImg.Height := Self.Height;
end;
destructor NewPanel.Destroy;
begin
MainImg.Destroy;
inherited Destroy();;
end;
end.
我把以上的控件安装上去了,编译没有错误,可是在程序里运行的时候就报错了,错误:
Class TImage not found!!
能帮我看看马,谢谢了,