Introducing Delphi
There are some words that have to be clear before we start learning
Application or application program is rows of codes to be done by computer. There are two kinds of application. Windows application and console application. Windows application is an application that runs under Windows. Non-Windows application, such as DOS application usually called console application. Generally, a Windows application has a form, but of course an application can have some forms. When we execute a form in a program, it will become a window.
A form usually contains some other components (a form is also a component). Label, button, edit box are components. Some components are visible. Label, button and edit box are visible components. The invisible component is called control. In
Running the IDE
IDE or Integrated Development Environment is a part of
We can run the Delphi IDE from start menu. The main appearance of Delphi IDE shows a new project (project1) and a form (form1). Now we will see the Delphi IDE below :
- Main menu contains some menus (File, Edit, Search…etc)
- Toolbar contains some icons / tools.
- Form Window is where you design your interface visually
- Object Inspector contains two tabs : Properties and Events
- Component Palette contains components you can place in the form.
Changing Form Properties
An object has some characteristics. A person has name, age, weight etc. As an object, a form also has some characteristics : name, height, width, color etc.
You can change the properties of form through the object inspector. A form has fifty properties. But only some of them we often use. Now let’s change the name and the caption of our form from the object inspector, and see what happen to it :
Name : My_Form
Caption : My First Form
Why should we set a name for our form ? because if we have more than one form in our project, My_Form is more easily remembered rather than Form1, Form2…….
Saving Project
Now we’re going to save our first project by choosing File – Save All. You must create a new folder, ie : PracticingDelphi. After you create a new folder then give a unit name and project name.
And there will be some files saved in the folder :
.cfg : contains project configurations
.dof : contains project options (linker, compiler, searching directories etc)
.dpr : a project file
.res : contains standard windows resources
.dfm : a form file
.pas : a unit resources file (Pascal object codes)
Running Program
You can press F9 to run the program. And the result is only a blank windows, because we haven’t added anything to our form :
After we run the program
Go to Next tutorial