Delphi7 directory structure
Open the installation directory of Delphi, such as c: \ Program Files \ Borland \ Delphi7. You will see that the directory contains some files and folders:
Source: stores all the source code provided by delpi, including VCL, WebSnap, intraweb, toolsapi, etc. We can find the source code of Delphi at ordinary times. The source code of some tools provided by Delphi is also placed under it, such as the source code of Borland socket server(scktsrvr.exe) and the web server used for intraweb debugging (httpsrvr. DPR), etc. If you have time to look at the source code, it will be of great benefit to improve yourself. For example, if you want to create a web server that supports CGI and support session, now you can study httpsrvr. DPR project, which can be used with slight modifications. The built-in source code of Delphi has only the advantages but no disadvantages. You may not be able to use it when learning it. But after a while, you will be aware of the related projects.
Rave5: The latest report tool integrated by Delphi7. This directory contains all support files for the rave5, such as rave.exe. This is a tool used to design the rave report format. With this tool, you can modify the report format template. The demo stores reports using rave5 as an example and uses rave as a report, this example must be used.
Projects: stores your own projects. This is the Directory prepared by Delphi for us to facilitate management, but we often do not store them like this. It is best to store our own projects in our own specified directory, this makes it easier to manage your code. Because, in general, many people are used to putting Delphi under the default system directory, and this disk is often a system disk. If you put your project under this directory, the code will be vulnerable to virus attacks or you will not be able to delete the code when carrying Delphi. This directory is designed by Delphi for us. We can skip it.
OCX: these directories are used to store New Delphi call code when the new OCX control is installed. For example, the code in the servers directory under this directory stores the code that calls the office system interface.
Objrepos: This directory stores delpphi templates, including template windows and template projects. For example, click File> New> other ..., Switch to the forms page, select about box, and click "OK ". An about form is automatically generated. The source code of this about form template is stored in this directory. We can find about in this directory. PAS and about. DFM, you can use Delphi to open and edit it, so that the next time you generate the about form from the template, it will be the form you want. Other templates for forms pages and template code for dialogs pages and business pages are stored in this directory. The win2kapp, sdiapp, and mdiapp directories in this directory also store template projects. These template windows or these template projects can be modified as desired templates. If you think these templates are not enough, you can add them. Add method:
Template project: Open the project to be a template, and click Project-> Add to reposipory.
Template window: Right-click the window to be a template and choose add to reposipory ....
Mergemodules: stores support files used when Microsoft Windows Installer Service is used to create an installer.
Lib: Mainly stores the DCU intermediate files generated by the source code provided by Delphi and the resource files used by these source codes. These DCU and Res are used during compilation and connection, which is conducive to speeding up compilation of Delphi, of course, there is no way to compile these res file projects.
Imports: stores DCU and PAS files generated after being imported to active control.
Help: stores help files for all built-in Delphi and third-party tools and controls. The directory contains three subdirectories:
Tools: HCW. EXE can be used to create windows help files.
Intraweb: stores intraweb help files.
Examples: There are some classic examples of using Delphi. For example, JPEG and bitmap directories are good examples for processing image plotting. If you need them, you can refer to them. The regini example is a good example for operating the registry, if you do not read or write the registry, you will understand that the example in the batchmv and batchmv2 directories is the example of using the tbatchmove to import data from BDE, with a little improvement, you can become a functional module for backing up data in your program. menu and menu2 are examples of menus... In short, I like these examples and will refer to them whenever necessary.
Demos: My favorite directory. It stores the example of using Delphi, which involves almost all aspects of Delphi, such as database programming (DB), three-layer (DAS), intraweb components (intraweb), and ADO programming (ADO) quick RPT, and Internet components. On the Forum, some netizens often ask how to write a LAN chat program. In fact, there are good examples, such as netchat), how to view extracted resources in EXE or DLL (resxplor, I often use it to extract icons in EXE or DLL, it is very useful )... There are also examples of writing components, such as demolbl and propedit. If you are a beginner of Delphi, you can learn every example in it. You should say that you can use Delphi to complete most of the development work.
Bin: main directory. the executable program of Delphi is stored here. It also includes all the tools provided by Delphi. For example, bordbg70.exe, which is required by delphi's remote deployment, mongodb.exe is a commonly used SQL explorer. brcc32.exeresource compilers use tools such as resfiles to compile programs in command mode...
Of course, if you do not know these directories, you can also use Delphi well, but for beginners, you may have to take a lot of detours. If you are familiar with these directories, you will be more comfortable and confident to use them.