Guide to Delphi file types
When you create a new project in Delphi, it creates between four and six files. This is a brief explanation of what those file types are, what they do and why you need them.
The key points are
|
The essential files, without which your project won't work, are the smaller of the project files (dpr) and the two unit files (dfm and pas)
the projectfile.dproj.local and projectfile.identcache are temporary files and are not important.
|
Saving a Delphi VCL project - what you need to do
Before you start to save a Delphi project, you'll need to decide on two names. One name for the project files (projectname) and one name for the unit files (unitname). They can't be the same. You'll also need a name for your folder - this should probably be the same name as for the project as a whole (projectname). It's important that the projectname is informative, so you know what it is several months from now.
To familiarise yourself with how to save and what happens when you do, try the following:
Create a new Delphi VCL program. Add a button, double click on that button and add a single line of code - for example:
showmessage('Hello World');
.. then click to exit Delphi. You'll first be asked if you want to save the the changes to your project. Click 'Yes' and you will be taken to a file dialogue box.
The default project location is 'RAD Studio\Projects' in your own personal working area (My Documents). Unless you are organised, this will quickly become very cluttered.
Note that Delphi won't let you call the project and the unit the same thing.
That's it. you now have a folder for your project with all the files kept in the same place.
To familiarise yourself with how to save and what happens when you do, try the following:
Create a new Delphi VCL program. Add a button, double click on that button and add a single line of code - for example:
showmessage('Hello World');
.. then click to exit Delphi. You'll first be asked if you want to save the the changes to your project. Click 'Yes' and you will be taken to a file dialogue box.
The default project location is 'RAD Studio\Projects' in your own personal working area (My Documents). Unless you are organised, this will quickly become very cluttered.
- Create a new folder and give it the name of your project (projectname).
- You'll now be asked for a name for your unit file. Type in your unit name (unitname)
- Then you'll be asked for a name for your project. Type in the project name (projectname)
Note that Delphi won't let you call the project and the unit the same thing.
That's it. you now have a folder for your project with all the files kept in the same place.