The Project File

In addition to the two files describing the form (PAS and DFM), a third file is vital for rebuilding the application. This is the Delphi project file (DPR). This file is built automatically, and you seldom need to change it, particularly for small programs. If you do need to change the behavior of a project, there are basically two ways to do so: You can use the Delphi Project Manager and set some project options, or you can manually edit the project file directly.

I Project Manager

_tí

Hello, ewe

3

x m

1

New

Remove Activate

Files

C:\Program Files\Borland\Delphi5\Projects Ë ip Hello.eue C:\dev\DelphiCode\EDelphiCode\M\Hello

É Jj] HelloForm C:\dev\DelphiCode\EDelphiCode\M\Hello

J[] HelloForm.pas C:\dev\Delphi Code\EDelphiCode\01\Hello ■HJ Formi C:\dev\DelphiCode\EDelphiCode\M\Hello

ProjectGroupl

C:\Program Files\Borland\Delphi5\Projects Ë ip Hello.eue C:\dev\DelphiCode\EDelphiCode\M\Hello

É Jj] HelloForm C:\dev\DelphiCode\EDelphiCode\M\Hello

J[] HelloForm.pas C:\dev\Delphi Code\EDelphiCode\01\Hello ■HJ Formi C:\dev\DelphiCode\EDelphiCode\M\Hello

This project file is really a Pascal language source file, describing the overall structure of the program and its startup code:

program Hello;

uses

Forms,

Hellof in 'HelloForm.PAS' {Forml}; {$R *.RES} begin

  1. Initialize;
  2. CreateForm(TForm1, Form1);
  3. Run; end.

You can see this file with the View | Project Source menu command. As an alternative, you can click on the Select unit button of the toolbar or issue the equivalent menu command, View | Units. When you use one of these commands, Delphi shows a dialog box with the list of the source files of the project. You can choose the project file (named Hello in the example), or any other file you are interested in seeing.

Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook


Post a comment