Delphi Project composition Project Document DPR

Source: Internet
Author: User

A Delphi project is composed of several related files. Some files are created at design time, and others are generated when the project is compiled. To manage Delphi projects effectively (Delphi project), you must know the purpose of each file.

Let me first familiarize myself with the project file, which was created at design time, with the extension of . DPR. This file is also the main file of the program.

The individual files of the Delphi project must follow a predefined format so that the compiler can read the unit and compile it into unit code.

Let me see how to view the project file DPR for the default Delphi project:

Step1, open Delphi7, selectFile | New | Application", create a default Delphi application;

Step2, selectProject | Viewsource, you can see a default Delphi Project source code (. DPR);

Step3, a default Delphi project source code is as follows:

12345678910111213 programProject1;                         {关键字program,标准的Pascal源文件格式}uses{uses单元引用列表}  Forms,                                  {Forms窗体单元}  Unit1 in‘Unit1.pas‘{Form1};{$R *.res}                                {编译器指令,引用项目的资源文件} begin{begin..end之间是具体的代码}  Application.Initialize;                 {初始化Appliaciton}  Application.CreateForm(TForm1, Form1);  {创建Application的主窗体}  Application.Run;                        {启动Application}end.                                      {关键字end.表示代码结束}

To this end, a simple Delphi project file is so concise, generally we do not need to edit the project file, unless you want to execute the program initialization routines, display the splash screen or perform other routines that must be run at program startup.

Delphi Project composition Project Document DPR

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.