You are on page 1of 15

Delphi Object

Pascal

.
2.0


//
//
//

11/19/2005

- -

Waheed Al-Sayer

. .
Delphi

:
:
.
.
: Start Programs
.
Borland Delphi .Delphi


Delphi . :
Tools Bar

11/19/2005

- -

Waheed Al-Sayer

Menu

)( Component Palette

) ( Object Inspector

;program Project1
}{$AppType Console
;uses Sysutils

begin
end.

Program Editor


. Program Editor Pascal 1
begin end. .begin .
DOS .Windows

: DOS

File New...

Console Application OK
11/19/2005

- -

Waheed Al-Sayer


:

.
.
.

;program Project1
}{$AppType Console
;uses SysUtils
begin
// Insert user code here
;Writeln
end.


:
Run Run

F9

Writeln .
DOS .
: READLN
.Pascal .Enter

.Ctrl+Break

Delphi
.Delphi
.
.


Ctrl+Space

Var Const .
Ctrl+J

Begin...End Delphi Begin


Delphi .End .Pascal


Delphi F7
. .

.
: "
" .

11/19/2005

- -

Waheed Al-Sayer

)(Breakpoint
) (Breakpoint
.
.
.


.

)(Evaluate/Watch
.
Evaluate .Watch

) . :
(.
Evaluate

Debug Evaluate .
Watch ) (Evaluate .

Debug
.Watch OK
.
.


Debug
) .(Optimized
:
Project .Options .

.Compiler
Optimization .
.

11/19/2005

- -

Waheed Al-Sayer

crt32.dcu

DOS .
. :
;Uses Sysutils, crt32
.

CRT32



White


X
Y
X
Y


X Y

X1 Y1 X2
Y2

11/19/2005

Statement
;ClrScr
;)TextColor (Red
;)TextBackGround (White
FastTextOut (X, Y, 'This is
;)text
FastWrite
(X,
Y,
LightBlue, White, 'This is
;)text
;)GotoXY (X, Y
;)Window (X1, Y1, X2, Y2

- -

Waheed Al-Sayer

: Windows
:


. menu bar title
bar speed bar
.component palette

.

Run Run F9 . F12


File New Application

11/19/2005

- -

Waheed Al-Sayer

) (

) (

Components ) (.
.


) (Pallets Standard
Additional . .

2 )( Component Palette

11/19/2005

- -

Waheed Al-Sayer

.
Edit .

Button

Label .

:
.
.
.

. Label

.Standard

11/19/2005

--

Waheed Al-Sayer


.Standard Palette

.
Running . .
.

11/19/2005

--

Waheed Al-Sayer


.
Project .Forms/Units
) (
.
Project1.DPR
Form2
Unit2.DFM

Form1

Unit2.PAS

Unit1.DFM

Unit1.PAS

Form3
Unit3.DFM

Unit3.PAS

) (
Save All
/
.

.

. Save in: .
. New Folder
.
.
. .
11/19/2005

.Enter

--

Waheed Al-Sayer

.
.
.

PAS .
.Save
. Project

Save
.
. )
( Save All

Caption

.
) ( Edit
. " ."Properties
.
Color
.

.

11/19/2005

--

Waheed Al-Sayer

Project Manager
Project
Manager View/Project Manager :

+



.


) .(Project1.exe Add
.Remove
:
Statement

Statement

)''(StrToFloat

)''(StrToInt

)(FloatToStr

)(IntToStr

'' =Edit1.Text :
Edit
)''(Memo1.Lines.Add
Memo
)''(ShowMessage


;Memo1.Clear

;Edit1.Clear

Memo
Edit
. Edit
;)(Edit1.Text := IntToStr
Edit

;))Memo1.Lines.Add(IntToStr(1+1
Memo
) ( :
.
. .Button1
.

.
;)ShowMessage('Hello '+Edit1.Text
.
11/19/2005

--

Waheed Al-Sayer

. : Edit1 Hello
. +
.
. .

. Button1 :


; ) )ShowMessage(IntToStr( StrToInt(Edit1.Text) + 10
: Edit1
.
Button1

:
. .
. .Edit
. Memo )( Memo1.Lines.Add .Memo1.
. Button .OnClick
. Button . Button
.

11/19/2005

--

Waheed Al-Sayer

You might also like