1. Home
  2. Computing & Technology
  3. Delphi Programming
How To Install Custom Component in Delphi (into existing package).

Let's see how to install custom component in Delphi (into existing package). Supose we have only one .pas file with component code.

Difficulty Level: easy      Time Required: 5 minutes


Here's How:
  1. Start Delphi and select Component | Install Component...
  2. This will invoke the "Install Component" dialog.
  3. In the "Unit File Name" edit box enter the name of the unit you want to install.
  4. If the unit is in the Search Path, a full path name is not required. If the unit directory is not in the Search Path, it will be added to the end.
  5. The "Search Path" edit box displays the path used by Delphi to search for files. Leave this as it is.
  6. Use the "Package file name" drop-down list to select the name of an installed package.
  7. Click on OK.
  8. Delphi will prompt you whether you want to rebuild the modified package or not.
  9. Click on Yes.
  10. After the package is compiled, Delphi will show you a message saying that the new TSomeComponent component was registered and already available as part of the VCL.
  11. Close the package detail window, allowing Delphi to save the changes to it.
  12. The component is now available in the components palette.
  13. Drop the component on a form, and simply: use it.
Tips:
  1. In step 3, you can click on the Browse button to browse for the component (unit)
  2. In step 6, default package is "Borland User Components", there is no special need to alter this.

Related Features:

Explore Delphi Programming
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming

©2009 About.com, a part of The New York Times Company.

All rights reserved.