Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Анг-язык на 22.10.12.docx
Скачиваний:
1
Добавлен:
20.11.2019
Размер:
38.94 Кб
Скачать
  1. Using project templates

Templates are predesigned projects that you can use as starting points for your own work. To create a new project from a template:

    1. Choose File|New|Other to display the New Items dialog box.

    2. Choose the Projects tab.

    3. Select the project template you want and choose OK.

    4. In the Select Directory dialog, specify a directory for the new project's files.

The template files are copied to the specified directory, where you can modify

them. The original project template is unaffected by your changes.

  1. Modifying shared items

If you modify an item in the Object Repository, your changes will affect all fu­ture projects that use the item as well as existing projects that have added the item with the Use or Inherit option. To avoid propagating changes to other projects, you have several alternatives:

Copy the item and modify it in your current project only.

Copy the item to the current project, modify it, then add it to the Repository under a different name.

Create a component, DLL, component template, or frame from the item. If you create a component or DLL, you can share it with other developers.

  1. Specifying a default project, new form, and main form

By default, when you choose File|New|Application or File|New|Form, a blank form appears. You can change this behavior by reconfiguring the Repository:

    1. Choose Tools|Repository.

    2. If you want to specify a default project, select the Projects page and choose an item under Objects. Then select the New Project check box.

    3. If you want to specify a default form, select a Repository page (such as Forms), them choose a form under Objects. To specify the default new form

(File|New|Form), select the New Form check box.. To specify the default main form for new projects, select the Main Form check box.

4 Click OK.

  1. Developing the application user interface: Overview

When you open the IDE or create a new project, a blank form is displayed on the screen. You design your application's user interface (UI) by placing and arranging visual components, such as windows, menus, and dialog boxes, from the Component palette onto the form.

  1. Controlling application behavior

TApplication, TScreen, and TForm are the classes that form the backbone of all applications by controlling the behavior of your project. The TApplication class forms the foundation of an application by providing properties and methods that en­capsulate the behavior of a standard program. TScreen is used at runtime to keep track of forms and data modules that have been loaded as well as maintaining system- specific information such as screen resolution and available display fonts. Instances of the TForm class are the building blocks of your application's user interface. The windows and dialog boxes in your application are based on TForm.

  1. Working at the application level

The global variable Application, of type TApplication, is in every VCL- or CLX-based application. Application encapsulates your application as well as provid­ing many functions that occur in the background of the program. For instance, Appli­cation handles how you call a Help file from the menu of your program. Understand­ing how TApplication works is more important to a component writer than to devel­opers of stand-alone applications, but you should set the options that Application handles in the Project|Options Application page when you create a project.