How to install third-party controls in Delphi

Source: Internet
Author: User

The installation methods are different because the components are provided in different ways.
Installation Method.

1 only has one DCU file component. The DCU file is a compiled unit file. The author does not want to expose the source code to the public.
Cloth. In general, the author must explain which version of this component is suitable for Delphi. if the version is incorrect
An error occurs. It is precisely because there is no source code that causes inconvenience to the user, that is, once the Delphi version is upgraded, this group
But some authors have provided several versions of DCU files. You can choose to use them as needed. This
The Installation Method of the sample component is as follows: In the component menu, select install Component. In the dialog box
On the "into existing package" page, click "Browse" after "unit file name ".
In the file dialog box, set "file type" to *. DCU, find the DCU file to be installed, and press OK to return
On the "into existing package" page, click OK to install the package. Note: At this time, Delphi will prompt
Dclusr40.dpk will be rebuilt, whether to continue, OK. Install the component in the dclusr40.dpk package,
This package can be seen from the file name as a user-defined component package. install it in this package first, and pay attention to it below.
Items. After the installation is complete, there will be prompts that the component has been registered and the information on the component page to which the component is installed, etc.
On the component panel, you can see a new component page with the newly installed component.

2. Only the PAS file or component with both the PAS and DCU files. This component has a PAS file, that is, the author mentions
For the source code, this is much easier to do. The installation method is the same as above. You can set the file type to DCU or
Set it to PAS. We recommend that you set it to PAS, so that you can recompile it with your Delphi to see if any problem occurs.
After Delphi is upgraded, you can only install the PAS file so that the component can be re-compiled to adapt to the new Delphi version.
Such components are worth using. Based on the experience of xinling, it is best not to use components without source code. First, they exist.
After the Delphi version is upgraded, you cannot debug the component to determine whether or not to use it.
Is a bug in the component.

3. component packages with dpk files. A component package with a dpk file generally consists of multiple components, that is, after installation
There will be multiple components for use. If only one component author is generally not made into a dpk file, use the above method to publish
You can. For such a package, there will be a detailed installation instruction file, as mentioned above rxlib,
Due to the complexity of components and the sequence of installation, the author does not provide installation instructions that users cannot install them correctly. If no
If there is an installation instruction file, use the following method to install it: Under the File menu, select "Open ..." Open the dpk File
(Select *. dpk in the file type list box). In the displayed package window, there is an install button on the toolbar.
Click to install. If the Install button is invalid, compile it by pressing the compile button.
After compilation, the Install button will be in the valid state, and then press the Install button.

4. component packages with BPL files. Generally, this is a component package composed of multiple components. It is actually a dynamic
Connect to the library file (DLL ). To install such a package, select
"Install packages", and then click the Add button to find the BPL file in the open file dialog box
Click OK.

5. Install ActiveX controls. To install such a configuration, register it with regsvr32.exe, and then select
Import ActiveX control in the component menu. In the window opened by import ActiveX control,
Only the registered ActiveX control is displayed in the list. Select one and press the Install button to install it.
If regsvr32.exe is not used for registration, you can click the Add button to find the ocx file and register it immediately.
Install.

Notes: 1. check whether there is a description file after obtaining the component. Generally, how to install the component in the description file?
Guidance, and some instructions on the use of component attributes, events, and methods, which are very important during use.
2. Copy *. BPL to your system directory before installing the above components (packages ).
*. Pas, *. DCU, *. DCR, *. DP? Copy it to the lib directory of Delphi before proceeding. 3 we mentioned earlier
When installing the DCU component, the existing dclusr40.dpk is used. You can also choose to install it in a new package,
If you select a new package, you must first obtain a name such as demo. In fact, after the installation is complete, you can find
Demo. BPL, but cannot find demo. dpk. If you have installed a component in dclusr40.dpk
Install a component. If you install the component again in dclusr40.dpk, you will be prompted about the component that was originally installed.
The registration has been canceled and you will not be able to use it. In this case, can only one component be installed? Unless you install
Only in a new package can two components be used at the same time. Of course, every time a component is installed, a new BPL file is generated.
But BPL files are much larger. Can I install several more components in dclusr40.dpk? Yes, of course.
. To open the dclusr40.dpk file, click Add.
In the dialog box, select the Add Unit page and press the "Browse" button after the unit file name to open the component unit file,
OK. In this way, you can add the unit files of multiple components. After adding the component, click the compile button and
Then press the Install button. If the unit file is compiled (DCU), press the Install button directly. 4. Component
Delete. It can only be installed, but it will also be deleted. Very simple. Under the component menu, select
Install packages. Find the BPL in the list and press the Remove button. OK! Delete the BPL file.
If you do not delete the BPL file, you can install and use the BPL component next time.

How to install third-party controls in Delphi

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.