About the basic components of Delphi 5, and some code examples of how to use them

From the Standard Group Tab:

Form (Tform)
TForm is the component for a standard application window (form).

Label (Tlabel)
TLabel is a nonwindowed control that displays text on a form. This text can be used to label another control, and can set focus to that control when the user types an accelerator key.

Button (Tbutton)
Use TButton to put a standard Windows push button on a form. TButton introduces several properties to control its behavior in a dialog box setting. Users choose button controls to initiate actions.

Edit (Tedit)
TEdit is a wrapper for a Windows single-line edit control.
Use a TEdit object to put a standard Windows edit control on a form. Edit controls are used to retrieve text that users type. Edit controls can also display text to the user.

ListBox (TlistBox)
TListBox is a wrapper for a Windows list box control.
Use TListBox to display a scrollable list of items that users can select, add or delete. For specialized list boxes use other descendant classes of TCustomListBox or derive from it.

From the Win32 Group Tab

Image (Timage)
TImage displays a graphical image.
Use TImage to display a graphical image on a form. Use a TPicture object to specify the actual bitmap, icon, metafile, or other graphic object displayed by TImage. TImage introduces several properties to determine how the image is displayed within the boundaries of the TImage object.

Shape (TShape)
TShape represents a geometric shape that can be drawn on a form.
Add a TShape object to a form to draw a simple geometric shape on the form. TShape introduces properties to describe the pen used to outline the shape and the brush used to fill it.

From the Win32 Group Tab

TabControl
Press F1 in Delphi when the focus is on the control to get more informations.

RichEdit
Press F1 in Delphi when the focus is on the control to get more informations.

TrackBar
Press F1 in Delphi when the focus is on the control to get more informations.

ToolBar
Press F1 in Delphi when the focus is on the control to get more informations.

From the System Group Tab:

Timer
TTimer encapsulates the Windows API timer functions.
TTimer is used to simplify calling the Windows API timer functions SetTimer and KillTimer, and to simplify processing the WM_TIMER messages. Use one timer component for each timer in the application.
Timer properties and methods affect the functionality of the timer by providing information for the timer event. This information includes the timer interval, which corresponds to the parameter for the Windows API SetTimer function. The actual execution of the timer occurs through its OnTimer event.

MediaPlayer
TMediaPlayer controls devices that provide a Media Control Interface (MCI) driver.
The TMediaPlayer component includes a set of buttons (Play, Stop, Eject, and so on) that control a multimedia device such as a CD-ROM drive, MIDI sequencer, or VCR. A multimedia device may be hardware or software.
The media player component contains of multiple buttons. These buttons can be clicked with the mouse, but are not separate objects or button components.

From the Dialogs Group Tab

OpenDialog
TOpenDialog displays a file-selection dialog.
TOpenDialog displays a modal Windows dialog box for selecting and opening files. The dialog does not appear at runtime until it is activated by a call to the Execute method. When the user clicks Open, the dialog closes and the selected file or files are stored in the Files property.

SaveDialog
TSaveDialog displays a "Save As" dialog for saving files.
TSaveDialog displays a modal Windows dialog box for selecting file names and saving files. The dialog does not appear at runtime until it is activated by a call to the Execute method. When the user clicks Save, the dialog closes and the selected file name is stored in the FileName property.

FontDialog
Press F1 in Delphi when the focus is on the control to get more informations.

ColorDialog
Press F1 in Delphi when the focus is on the control to get more informations.

From the Win 3.1 Group Tab

FileListBox
TFileListBox is a specialized list box that lists all the files in a specified directory.
Add TFileListBox to a form to allow users to select a file. Use TFileListBox along with TDriveComboBox, TFilterComboBox, and TDirectoryListBox to add full file selection capabilities to a form.

DirectoryListBox
TDirectoryListBox represents a list box control that is aware of the directory structure of the current drive.
TDirectoryListBox implements the generic behavior introduced in TCustomListBox. TDirectoryListBox publishes many of the properties inherited from TCustomListBox and introduces new behavior to let the user change directories or drives.

DriveListBox
TDriveComboBox implements a specialized combo box that displays all the drives available when the application runs.
Add TDriveComboBox to a form to allow users to select a drive. Use TDriveComboBox along with TFileListBox, TFilterComboBox, and TDirectoryListBox to add full file selection capabilities to a form.

From the Samples Group Tab

ProgressBar
This is a sample component made by Delphi producers (Borland) to demonstrate the power of creating VCL.

These are only the basics components of Delphi 5. You can install new components and even create your own components that are used in your application, and you don't have to use any additional libraries (DLL's) or ActiveX controls (OCX's) at runtime. If you have a connection with Internet you can check Delphi Pages (www.delphipages.com) to get new components. Try FlatStyle Components to see how radically you can change some basic controls.

Now, if you have a new component you should install it

Installing New Components

First you Should Create a New Package because all Components go into Packages.
We recommend that you create a new Package for your Components. Of course you can install the components in Borland Delphi's already created packages, but this way you will modify them.

To Create a New Package you have to Install a New Component into it.
Creating a New Package (and Installing a Component)

  • Component(Menu)
  • Install Component
  • Into New Package(Tab)
  • Enter Name PACKAGE FILE NAME e.g. 'Test1'
  • Browser(Button)
  • Pick .pas or .dcu File (for the New Component) (that you Downloaded from the Web)-Open-hit OK ...
  • Exit (X on top right of Dialog Box (Dialog Form)

Note: You can Install a Component from a .pas or a .dcu
If you only have a .dcu (built by Delphi3), D4 will not Install it. If you have the .pas then, D4 can install it.

Installing a New Component in an Existing Package:

  • Component(menu)
  • Install Component
  • Select PACKAGE NAME FILE (e.g. 'Test1')
  • Browse (for UNIT FILE NAME) (as .pas or .dcu)
  • Pick a file
  • Open
  • OK
  • Confirm YES

Now a new Tab in the Components tab should exists. If there is no new tab and no fatal error occurred while compiling the package, then the component has installed in a already existing Tab.