1、中文 3000 字 附录 2 英文翻译 英文部分 rDeveloping applications with Delphi Borland Delphi is an object-oriented, visual programming environment to develop32-bit applications for deployment on Windows and Linux. Using Delphi, you can create highly efficient applications with a minimum of manual coding. Delphi pro
2、vides a suite of Rapid Application Development (RAD) design tools,including programming wizards and application and form templates, and supports object-oriented programming with a comprehensive class library that includes: The Visual Component Library (VCL), which includes objects that encapsulate t
3、heWindows API as well as other useful programming techniques (Windows). The Borland Component Library for Cross-Platform (CLX), which includes objects that encapsulate the Qt library (Windows or Linux). This chapter briefly describes the Delphi development environment and how it fitsinto the develop
4、ment life cycle. The rest of this manual provides technical details ondeveloping general-purpose, database, Internet and Intranet applications, creatingActiveX and COM controls, and writing your own components. Integrated development environment When you start Delphi, you are immediately placed with
5、in the integrated development environment, also called the IDE. This IDE provides all the tools you need to design, develop, test, debug, and deploy applications, allowing rapid prototyping and a shorter development time. The IDE includes all the tools necessary to start designing applications, such
6、 as the: Form Designer, or form, a blank window on which to design the user interface (UI) for your application. Component palette for displaying visual and nonvisual components you can use to design your user interface. Object Inspector for examining and changing an objects properties and events. O
7、bject TreeView for displaying and changing a components logical relationships. Code editor for writing and editing the underlying program logic. Project Manager for managing the files that make up one or more projects. Integrated debugger for finding and fixing errors in your code. Many other tools
8、such as property editors to change the values for an objects property. Command-line tools including compilers, linkers, and other utilities. Extensive class libraries with many reusable objects. Many of the objects provided in the class library are accessible in the IDE from the Component palette. B
9、y convention, the names of objects in the class library begin with a T, such as TStatusBar. Names of objects that begin with a Q are based on the Qt library and are used for cross-platform applications. Some tools may not be included in all editions of the product. A more complete overview of the de
10、velopment environment is presented in the Quick Start manual included with the product. In addition, the online Help system provides help on all menus, dialog boxes, and windows. Designing applications You can design any kind of 32-bit applicationfrom general-purpose utilities to sophisti ated data
11、access programs or distributed applications. As you visually design the user interface for your application, the Form Designer generates the underlying Delphi code to support the application. As you select and modify the properties of components and forms, the results of those changes appear automat
12、ically in the source code, and vice versa. You can modify the source files directly with any text editor, including the built-in Code editor. The changes you make are immediately reflected in the visual environment.c You can create your own components using the Delphi language. Most of the component
13、s provided are written in Delphi. You can add components that you write to the Component palette and customize the palette for your use by including new tabs if needed. You can also design applications that run on both Linux and Windows by using CLX components. CLX contains a set of classes that, if
14、 used instead of those in the VCL, allows your program to port between Windows and Linux. Refer to Chapter 15, “Developing cross-platform applications” for details about cross-platform programming and the differences between the Windows and Linux environments. If you are using Kylix while developing
15、 cross-platform applications, Kylix also includes a Developers Guide that is tailored for the Linux environment. You can refer to the manual both in the Kylix online Help or the printed manual provided with the Kylix product. Chapter 8, “Building applications, components, and libraries,” introduces
16、support for different types of applications. Creating projects All application development revolves around projects. When you create an application in Delphi you are creating a project. A project is a collection of files that make up an application. Some of these files are created at design time. Ot
17、hers are generated automatically when you compile the project source code. You can view the contents of a project in a project management tool called the Project Manager. The Project Manager lists, in a hierarchical view, the unit names, the forms contained in the unit (if there is one), and shows t
18、he paths to the files in the project. Although you can edit many of these files directly, it is often easier and more reliable to use the visual tools. At the top of the project hierarchy is a group file. You can combine multiple projects into a project group. This allows you to open more than one project at a time in the Project Manager. Project groups let you organize and work on related projects, such as applications that function together or parts of a multi-tiered application. If you