ReadRootComponent的问题,急呀!!(50分)

  • 主题发起人 主题发起人 liujin
  • 开始时间 开始时间
L

liujin

Unregistered / Unconfirmed
GUEST, unregistred user!
Procedure TCreateCom.ControlLoad(FileName :String);
var
Ts : TFileStream;
New : TComponent;
Read1 : TReader;
begin
Classes.RegisterClasses([TLabelX]);
TS := TFileStream.Create (FileName,fmOpenRead or fmShareDenyWrite);
While TS.Position < TS.Size Do
begin
Read1 := TReader.Create(TS,4096);
try
Read1.Parent := FOwner;
New := Read1.ReadRootComponent(nil);
if New is TLabelX then
(New as TLabelX).LabelMove;
FOwner.InsertComponent(New);
Finally
Read1.Free;
end;
end;
Ts.Free;
end;

运行到New := Read1.ReadRootComponent(nil);这里时
老是提示类没找到“Class TLabelX not found”
 

Similar threads

I
回复
0
查看
704
import
I
I
回复
0
查看
782
import
I
I
回复
0
查看
529
import
I
I
回复
0
查看
504
import
I
后退
顶部