开发者

How do I use the descendant's form without the presence of ancestor's form visually

I just created a form within bpl project and place it on repository, named AncForm. When I made its descendant in a new project (program Inheritance1) named DecForm. Normally, AncForm will be included in the new project automatical开发者_如何学Pythonly when DecForm just inherited from AncForm.

program Inheritance1;

{$R *.res}

uses

  Forms,
  cAncForm in 'cAncForm.pas' {AncForm}, //-----> Ancestor ..... Line A
  uDecForm in 'uDecForm.pas' {DecForm}; //-----> Descendant ..... Line B

begin
  Application.Initialize;
  Application.CreateForm(TDecForm, DecForm);
  Application.Run;
end.

The question is: is there any way to link the DecForm to AncForm within this project without the presence of "Line A"? I mean the AncForm is not visually linked to project but still be able to provide reference to DecForm within IDE, without "error creating form...".

I hope there is a way to fully wrap the ancestor inside BPL.

I would gratefully thanks for any idea.


You need to add the package project in which the ancestor form lives to the same project group as your applications. The IDE will notice that the form is in the package project and not add it to the uses list of the application project.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜