Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Â
Delphi L01 Intro
1. Intro to Event-driven Programming
and Forms with Delphi
L01 - Introduction
Mohammad Shaker
mohammadshakergtr.wordpress.com
Intro to Event-driven Programming and Forms with Delphi
@ZGTRShaker
2010, 2011, 2012
2.
3. About the Course
â˘
â˘
â˘
â˘
Delphi 2007-2009
How to think like a programmer
Test Questions
You need to try your self, otherwise it wonât work out with
you (practice, practice, practice)
4. Course plan
â˘
â˘
â˘
â˘
â˘
â˘
â˘
â˘
â˘
â˘
Introduction to Delphi
Introduction to IDE & Event Driven Programming
StartSaveOpen a project
Form design (designruntime )
Delphi Components
Input Handling
Event handling
Files
Drawing (Canvas, Timer, etc.)
Instantiate Controls at Runtime
5. Delphi History
â˘
â˘
â˘
â˘
â˘
â˘
âALGOLâ* the first high-level language
âALGOLâ* > Pascal âNiklaus Wirthâ**
the original definition of Pascal was published in 1971.
Pascal becomes the âFORMALâ programming language.
Turbo Pascal 1.0 (November 1983)
Delphi in 1995 Was introduced for âVisual Programmingâ
⢠*ALGOL: Algorithmic language
⢠** Niklaus Wirth: (b. February 15, 1934) is a Swiss computer scientist, best
known for designing Pascal programming language, and for pioneering
several classic topics in software engineering. In 1984 he won the Turing
Award for developing a sequence of innovative computer languages.
7. Differences
⢠Interface: from âConsoleâ to âVisualâ.
⢠All Applications need Visual Interaction.
⢠IDE: (Integrated Development Environment)
8. Delphi Preferences & features
â˘
â˘
â˘
â˘
â˘
OOP (Object Oriented Programming)
Applications: are build in the form of âformsâ.
Components
Api functions âin Windowsâ.
10 times faster compiler in comparison to other programming
languages.
â Executive building files (exe) forms.
â No DLL libraries like other programming languages (Dynamic Link
Library)
â Database compatibility.
17. OpenSave a Project
⢠When saved.
â first, âUNITâ is being saved
â Then, the âPROJECTâ
⢠File > Save as
(Pas file is saved)
⢠File > Save project as
(dpr is saved)
⢠âexe.â file is formed in running time.
30. Forms properties
⢠All the following properties are âbooleanâs:
â BiSystemMenu:
⢠All three buttons disappear.
â BiMinimize:
⢠to taskbar minimization.
â BiMaximize:
⢠resize button.
â BiHelp:
⢠â?â button.
⢠Position: the place the form will appear on the screen.
⢠Icon: the style of the formâs icon.
â You can browse it from your PC images & pics.
33. Button properties
⢠Name: the one we use in code (we canât write in Arabic here.)
⢠Caption: the âVisualâ name that will appear to the client. (we can
write in Arabic here) *
⢠Topleft: parametric variables indicate the position of the
component in the form.
⢠Fonts: colorvolume & type of the written âCaptionâ design.
⢠Hint: showing a âhintâ when the cursor (mouse) stop on the âbuttonâ.
⢠Show Hint: shows the written hint above.
⢠Visible ďł Enabled
⢠Tab Order
⢠etc.
_________________________________
*Delphi is Arabic compatible
41. ShowMessage
⢠The name of the application's executable file appears as the
âcaptionâ of the message box.
⢠Msg parameter is the message string that appears in the
message box.
⢠Code example:
Var worked:boolean;
If (not(Worked)) then
ShowMessage (âCmon
Work â);