Unit 1, Delphi 4 Introduction
Introduction to Delphi
Providing a lot of multiple components to assist program design design design design design design design design design design design design design design design design design design design
Delphi installation
installation
Perform the setup.exe in the disc.
Directory Structure
start up
Execute C: / Program Files / Borland / Delphi 4 / Bin / Delphi32.exe
1.3 Delphi Integrated Development Environment (IDE)
1.3.1 Quick Button
The first group: the file related file
The second group: Manage forms and program units
Group 3: Execution and Error
1.3.2 component selection
Components are divided into several categories:
Standard: The components used in general window programs such as Mainmenu, Button, etc. Additional: Supplementary Standard is not covered, such as scrollbox, speedbutton, etc. Win32: Control components in the Windows 32BITS environment, such as Richedit, ImageList, etc. System: Control system components such as Timer, MediaPlayer, etc. Internet: The components of the network application, such as FTP, HTML, etc. DataAccess: Main components that make the application and the database link, such as DataSource, Table, etc. DataControl: The components of the operation database, such as Dbimage, Dbedit, etc. Decisioncube: Decision components such as DecisionQuerry, Decisionsource, etc. QReport: Processing the components of the report report format, such as QuickRep, QRSUBDetail, etc. Dialogs: Dialogue, such as OpenDialog, Savedialog, etc. Win3.1: Old Windows 3.1 component. Samples: sample elements such as DirectoryoutLine, Calendar, etc. ActiveX: Applicate Owners, VTChart, Graph, etc. Chinese Application Components: Assist in developing systems using Chinese, such as dbedIText, Calenderl, etc.
1.3.3 Form (FORM)
The interface between the user and the program. Every item has a major form, and Delphi will automatically turn the object on the table to the program code.
1.3.4 Program Editor (Code Editor)
Each form in the item has a program unit (* .pas), and the code editor is used to edit these program units.
1.3.5 Object Inspector
The object selection list contains all items contained in this item. When the object is selected, his characteristics are in the object viewer. One item contains two important information: characteristics and events, both of which can be changed directly by the object viewer.
1.4 Write the first Delphi program - Message column
1.4.1 Add to use components
Start Delphi. Select File | New Application to open a new project. Add editing blocks. That is, the EDIT component in the Standard page is added. The addition method is to find the following pattern in the STANDARD page of the component searcher, first select the pattern and then place the mouse point in the place where you want to place. Add a list of quarters and buttons. That is, the components ListBox and Button are added.
The table at this time is as shown below Form1. This may be compiled and executed with Run | RUN.
1.4.2 change characteristics
Change the CAPTION of the button button to ADD (select Button1, and then change the CAPTION characteristics in the object checker by Button1 to add). Clear the edit1 in the editing block (select the editing block, clear the contents of the text feature in the object viewer). Change the Sorted feature of the list to TRUE. Change the title of FORM1 to Listboard. Write an event handler (Event Handler)
First select the Add button, then find OnClick in its object checker's event (Event) column, then the following program editor appears after double-click. Schedule code
Listbox1.items.add (edit1.text);
Add it (where the cursor is referred to).
After pressing Run | RUN, you can get the following window, you enter some words, then press the Add button to see.