Breaking News
Loading...
Thursday, December 19, 2013

1.  Starting Delphi. Preparing to install a new component
6 Step How To Installing a Single Source Borland Delphi 7 Component Into an Existing Package 1 192x300

There are many free source Delphi components arround the Internet you can install freely and use in your applications.


If you need to install a third-party Delphi component, and you only have the .PAS source file(s), follow this step-by-step tutorial and learn how to add the component into an existing package.


Note 1:  this tutorial covers installing components in Delphi for Win32 (Delphi 7).


You’ll learn how to install the TColorButton component.


First, start Delphi. A new project is created by default … close it by pointing to File – Close All.


2. Delphi IDE menu: Component – Install Component
6 Step How To Installing a Single Source Borland Delphi 7 Component Into an Existing Package 2 300x190

Once the default new project is closed, select the “Install Component” menu item from the “Component” main Delphi IDE menu.


This will invoke the ‘Install Component‘ dialog.


3. “Install Componentdialog box
6 Step How To Installing a Single Source Borland Delphi 7 Component Into an Existing Package 3 300x143

With the “Install Component” dialog active, select the file with the component’s source (?.PAS). Use the Browse button to select the unit, or enter the name of the unit you want to install in the “Unit File Name” edit box.






Note 1: If the unit’s folder is in the Search Path, a full path name is not required. If the folder containing the unit file is not in the Search Path, it will be added to the end.

Note 2: The “Search Path” edit box displays the path used by Delphi to search for files. Leave this as it is.


4. Select Delphi Package for the component
6 Step How To Installing a Single Source Borland Delphi 7 Component Into an Existing Package 4 300x143

Use the “Package file name” drop-down list to select the name of an existing package. Note: all Delphi components are installed in the IDE as packages.


Note 1: The default package is “Borland User Components“, there is no special need to alter this.


Note 2: The screen shot shows that the package “ADP_Components.dpk” is selected.


With the component’s unit and package selected, hit the “OK” button on the “Install Component” dialog box.


5. Confirm adding a new component
6 Step How To Installing a Single Source Borland Delphi 7 Component Into an Existing Package 5 300x172

With the component’s unit and package selected, after you hit the “OK” button on the “Install Component” dialog box Delphi will prompt you whether you want to rebuild the modified package or not.


Click on “Yes


After the package is compiled, Delphi will show you a message saying that the new TColorButton (or whatever the component name is) component was registered and already available as part of the VCL.


Close the package detail window, allowing Delphi to save the changes to it.


6. Using the installed component
6 Step How To Installing a Single Source Borland Delphi 7 Component Into an Existing Package 6 300x134

If all went well, the component is now available in the components palette.


Drop the component on a form, and simply: use it.


Note: if you have more units with components, just go back to Step 2: “Delphi IDE menu: Component – Install Component” and start from there.


Source From:  delphi.about.com





-=Thank.you=-



0 comments:

Post a Comment

 

Receive All Free Updates Via Facebook.