我作控件,怎么会有好几个错误,比如'identifier redeclared:'sunlistviewprint '.实在没有分了。(5分)

  • 主题发起人 主题发起人 Tsunky
  • 开始时间 开始时间
T

Tsunky

Unregistered / Unconfirmed
GUEST, unregistred user!
unit Sunlistviewprint;

interface

uses
Windows, Messages, SysUtils, Classes,unit1,QComCtrls;

type
Sunlistviewprint = class(Tcomponent)/////错误在这里,'identifier redeclared:'sunlistviewprint '
private
mypagehead:string;
mypagefooter:string;
mylistview:Tlistview;
{ Private declarations }
protected
{ Protected declarations }
public
procedure showreport;
{ Public declarations }
published
property pagehead:string read mypagehead write mypagehead;
property pagefooter:string read mypagefooter write mypagefooter;
property listview:Tlistview read mylistview write mylistview;
{ Published declarations }
end;

procedure Register;

implementation

procedure Register;
begin
RegisterComponents('Microsun', [Sunlistviewprint]);
end;

{ Sunlistviewprint }

procedure Sunlistviewprint.showreport;
begin
frmstringgird:=Tfrmstringgird.create(application);
try
frmstringgird.showlistview(mylistview);
frmstringgird.ShowModal;
finally
frmstringgird.Free;
end;

end;

end.
 
与单元名相同了吧,建议加"t"
 
接受答案了.
 
后退
顶部