SlideServe
Menu
Préférences
© SlideServe · v2026

Delphi 4

xannon avatar
18 diapositives · 460 Views · Oct 21, 2014

Delphi 4. Introduction to IDE Overview of Delphi Programs Visual Programming. Overview of I ntegrated D evelopment E nvironment. Using Delphi from Windows Main window Form Designer Window Object Inspector Window Code Editor Window Project Manager Creating a Delphi project.

Delphi 4 - slide 1
01 / 18Delphi 4
1 / 17

Télécharger la présentation

Delphi 4
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Delphi 4 Introduction to IDE Overview of Delphi Programs Visual Programming

  2. Overview of Integrated Development Environment • Using Delphi from Windows • Main window • Form Designer Window • Object Inspector Window • Code Editor Window • Project Manager • Creating a Delphi project

  3. Main Window • Menu Line • Toolbar • Left: Speed buttons for Menu commands • Right: Component palette • Components which can be chosen to insert into the user interface you are designing. • You insert components into the Form Designer Window (right hand window)

  4. Object Inspector Window:Properties Page Properties: Attributes of component, e.g. • Caption -- text for title bar • Enabled -- mouse and keyboard input • WindowState -- initially displayed maximized, minimized, or normal • Active Control -- which visual component initially has the focus (user can tab or use mouse to change)

  5. Object Inspector: Events Page Event: user input (e.g. user selects the component) • Double click an event -- e.g. OnClick • Write the code to handle that event in the skeleton procedure provided in the Code Editor Window

  6. Saving and Running a Delphi Project • Save each Form unit with an appropriate name (PAS is automatic extension for the code file, DFM for visual resources automatically saved) • Save Project (DPR is automatic extension for the project module) • Compile & Run (DCU files created for units, EXE file created for program)

  7. Programs and Units • Main program. • Units • Interface -- defines data and subprograms available to client units and program • Implementation -- local variables for unit and detailed implementation of subprograms

  8. Object-Oriented programming • Class: a type, which contains data and methods(operations) associated with that data. • Descendent Class: a type which inherits data and methods from its ancestor class. • Object: an instance of a class (variable declared as that type)

  9. Controlled Access to Data and Methods of a Class TClassName = Class public {data and methods available to instances and descendent classes} protected {those available to descendent classes, not to instances} private {those not available to either} end;

  10. Visual Programming • Form design • Object-oriented code generation • Event-driven programming • Components • Secondary Forms • Modal dialog boxes • Modeless dialog boxes

  11. Form Design and Code Generation • You begin with a main form; Delphi generates • main program • skeleton declaration of descendent class for main form • You select and position components; Delphi generates • classes as fields of main form

  12. Event Driven Programming Flow of control is in hands of user -- by mouse and keyboard events. • For a chosen component, you double-click on one of its event handlers. • Delphi generates • a method in the form class in interface • a skeleton method in implementation • You supply code in event handler.

  13. Components: Toolbars Several groups of components are available: • Standard • Additional • two database groups • Dialogs • System

  14. Notable Standard Components • menus • Label • EditBox (single line input) • Memo (multiple line input) • Button • CheckBox (yes/no on each choice) • ListBox (scrollable list -- select one) • ScrollBar

  15. Other Notable Components • Additional • BitButton • SpeedButton • StringGrid • Dialogs • OpenDialog, SaveDialog (for file speed button) • System • Timer (invisible -- triggers timed event)

  16. Component Classes • Windowed -- inherit Microsoft Windows controls, can have focus, e.g. • TForm • TMemo • Non-windowed, e.g. • TLabel • Non-Visual, e.g. • TTimer

  17. Secondary Forms Select File|New Form to generate. (Note: a new unit is generated for each form.) • Modeless dialog boxes • user can click outside the box • Modal dialog boxes • must be closed before user can access other pre-existing windows • include call to dialog box’s ShowModal method in its button click handler

  18. Assignment • Begin exploring Delphi 4, using • on-line documentation • Quick Start • Optional “Teach Yourself Delphi 4 in 21 Days” • Create a project of your choosing to show what you learned this week. • Turn in • source code listing • executable code on disk