BDelphi8

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Lesson 8 Projects, the Code Editor and the Code Explorer
8.2 Understanding Project Options Code Generation
• The compiler can be configured to perform optimizations on your code. • When optimizations are turned off, the compiler makes no attempts to optimize code in any way. If you turn the Optimization option on, the compiler will generate the fastest code possible without regard to code size. In most cases, you should leave this option on the default setting. • The Aligned Record Fields option is used to control how records are aligned in memory. • The Pentium-Safe FDIV option causes the compiler to generate code that detects a faulty floating-point division instruction.
Lesson 8 Projects, the Code Editor and the Code Explorer
8.2 Understanding Project Options The Linker Page • The Linker page of the Project Options dialog box is where you set options that specify how you want the linker to operate. Until you become very familiar with Delphi, you can leave this page alone and accept the default settings. Figure 9.6 shows the Linker page of the Project Options dialog box. The options available on this page are explained in the following sections.
• The ability to work on a DLL and a test EXE for the DLL at the same time. • The ability to build (compile and link) a group of project源自文库 all at one time. • The ability to have several projects open at one time and to easily switch between open projects.
• • The Forms page is where you control how your application handles its forms. At the top of the Forms page is the Main form combo box. This is where you tell Delphi which form to display when the application starts. In the middle of the dialog box are two list boxes. The list box on the left is labeled Auto-create forms; the one on the right is labeled Available forms. Auto-creation means that Delphi will construct the form during the application startup process. Forms that are auto-created display more quickly than forms that are not auto-created. The disadvantage to auto-creation of forms is that your application will use more memory than it would if your forms were not auto-created. Another disadvantage is that your application will take slightly longer to load if you are auto-creating a lot of forms.
• A way to organize related projects.
Lesson 8 Projects, the Code Editor and the Code Explorer
8.1 Using the Project Manager
The Active Project
• In any project group there is always an active project. • The active project is displayed in the Project Manager in bold type. • The active project is the project that will be built when you choose Make or Build from the Project menu on the Delphi main menu.
Lesson 8 Projects, the Code Editor and the Code Explorer
8.1 Using the Project Manager
• Why Use Project Groups?
• Better control over a complete software project.

• • •
Linker
Directories/Conditionals Version Info Packages
Lesson 8 Projects, the Code Editor and the Code Explorer
8.2 Understanding Project Options The Forms Page



Lesson 8 Projects, the Code Editor and the Code Explorer
8.2 Understanding Project Options The Forms Page
• • • • • •
var form2:Tform2; begin form2:=Tform2.Create(self); form2.ShowModal; form2.Free;
Lesson 8 Projects, the Code Editor and the Code Explorer
8.2 Understanding Project Options
The Project Options dialog box is a tabbed dialog box with several pages: • • • Forms Application Compiler
Lesson 8 Projects, the Code Editor and the Code Explorer
Lesson 8 Projects, the Code Editor and the Code Explorer
8.2 Understanding Project Options The Application Page • The Title field is used to set the title of the application. • The Help file field is used to set the help file that your application will use. • The Icon option enables you to choose an icon for your application. • Target file extension field to specify the filename extension of the project when the project is built.
Lesson 8 Projects, the Code Editor and the Code Explorer
8.2 Understanding Project Options
The Compiler Page
• The Compiler page of the Project Options dialog box is where you set the options that the compiler uses to build your project. • The Compiler page is divided into five sections.
Lesson 8 Projects, the Code Editor and the Code Explorer
8.2 Understanding Project Options Messages • The Messages section determines whether you want the compiler to report hints and warnings after compiling. I always leave both the Show Hints and Show Warnings options on. Hints and warnings should not be ignored in the long term. Usually, compiler warnings can, and should, be resolved. Learn to treat hints and warnings as errors. Quality code compiles without warnings.
Lesson 8 Projects, the Code Editor and the Code Explorer
8.1 Using the Project Manager 8.2 Understanding Project Options 8.3 The Delphi Code Editor 8.4 The Code Explorer
Lesson 8 Projects, the Code Editor and the Code Explorer
8.2 Understanding Project Options The Directories/Conditionals Page The Directories/Conditionals page of the Project Options dialog box is where you set the directories that your project uses to find library files.
相关文档
最新文档