A Delphi project consists of several related files. Some files are created during design, while others are generated during project compilation. To effectively manage the Delphi project, you must know the purpose of each file.
Next I will familiarize myself with the project file. The project file was created at design time and its extension is. DPR. This file is alsoProgram.
Each file of the Delphi project must comply with the predefined format so that the compiler can understand the unit and compile it into a unit.Code.
Next let's take a look at how to view the project file DPR of the default Delphi project:
Step 1. OpenDelphi7, Select 【File | new | Application] To create a default Delphi application;
Step 2. Select 【Project | View Source], You can see a default Delphi projectSource code(. DPR );
Step 3. the source code of a default Delphi project is as follows:
Program project1; {keyword program, standard Pascal source file format} uses {uses unit Reference List} forms, {forms form unit} unit1 in 'unit1. PAS '{form1}; {$ R *. res} {compiler instruction, referencing the project's resource file} begin {begin .. specific Code} application. initialize; {initialize appliaciton} application. createform (tform1, form1); {the main form for creating the application} application. run; {start application} end. {keyword end. indicates code end}
So far, a simple Delphi project file is so concise that we do not need to edit the project file, unless you want to execute the program initialization routine, display the startup screen, or execute other routines that must run when the program starts.