The package in Delphi (ii): About BPL

Source: Internet
Author: User
Tags requires

Write your own DPK project to change the test of our conjecture. We first set up a project group that contains three projects:

Program Projectexe;
Uses
Forms,
Windows
Unitformmain in ' Unitformmain.pas ' {formmain};
{$R *.res}
Begin
Application.initialize;
Application.createform (Tformmain, FormMain);
Application.Run;
End.
Unit Unitformmain;
Interface
Uses
Windows, Stdctrls, Forms, Classes, Controls;
Type
Tformmain = Class (Tform)
Button1:tbutton;
Procedure Button1Click (Sender:tobject);
Private
{Private declarations}
Public
{Public declarations}
End
Var
Formmain:tformmain;
Implementation
{$R *.DFM}
Procedure Tformmain.button1click (Sender:tobject);
Var
Lform:tform2;
Begin
Lform:=tform2.create (application);
Lform.showmodal;
Lform.free;
End
End.
Package Package1;
Requires
Vcl
Rtl
Contains
Unitformanother in ' Unitformanother.pas ' {formanother},
UnitForm1 in ' Unitform1.pas ' {Form1};
End.
Unit Unitformanother;
Interface
Uses
Forms;
Type
Tformanother = Class (Tform)
Private
{Private declarations}
Public
{Public declarations}
End
Implementation
{$R *.DFM}
End.
Unit UnitForm1;
Interface
Uses
Unitformanother;
Type
TForm1 = Class (Tformanother)
Private
{Private declarations}
Public
{Public declarations}
End
Implementation
{$R *.DFM}
End.
Package Package2;
Requires
Rtl
Vcl
Contains
UnitForm2 in ' Unitform2.pas ' {Form2};
End.
Unit UnitForm2;
Interface
Uses
Unitformanother;
Type
TForm2 = Class (Tformanother)
Private
{Private declarations}
Public
{Public declarations}
End
Implementation
{$R *.DFM}
End.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.