问题-Delphi在做窗体派生时提示Resource TForm2 not found

相关资料:

https://www.baidu.com/link?url=yYEHJesIUg6HguekaIW-U0HtjtLn430Dh0NXSc7ej5ixppqcq21rsYMvlCo_qNOP&wd=&eqid=87bf080a00000c50000000035e83f9e4

https://bbs.csdn.net/topics/310093070?locationNum=13&fps=1

问题描述:

在练习接口继承时,需要派生一个窗体,写好代码后提示“Resource TForm2 not found”。

问题原因:

在派生窗体时需要有资源,所以派生的类需要重写Create方法,Create里面调用CreateNew方法。

处理方法:

constructor TForm2.Create(AOwner: TComponent);
begin
inherited CreateNew(AOwner);
end;

 

 

posted on 2020-04-01 11:28  疯狂delphi  阅读(288)  评论(0编辑  收藏  举报

导航