1 only has one DCU file component. The DCU file is a compiled unit file. The author does not want
Code announcement. 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 makes it inconvenient for users, that is, once the Delphi version is upgraded,
This component can no longer be used. Of course, some authors have provided several versions of DCU files. You can choose to use them as needed.
The component installation method is as follows: In the component menu, select install component, and 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 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.
It can be seen that it is a user-defined component package. install it in this package first. Next, let's talk about the precautions.
After the installation is complete, a prompt message indicating that the component has been registered and the information on the component page to which the component is installed will be sent to the component panel.
The following figure shows 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 source code is provided, which is much easier. The installation method is the same as above. In the file type, it can be set to DCU.
You can also 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 experience, it is best not to use components without source code. First, the Delphi version exists.
After the upgrade, the user cannot debug the component to determine whether the component is saved.
In bug. (You need to set the file directory to tools --> enviroment options --> library ---> librayr path)
3. component packages with dpk files. A component package with a dpk file generally consists of multiple components, that is, the installation
There will be multiple components for use later. If only one component author is generally not made into a dpk file, you can publish it using the above method. For such a package, there will generally be a detailed installation instruction file, such as rxlib. Due to the complexity of the components and the order of installation, the author does not provide installation instructions, which means that users cannot install them correctly. If there is no 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, the Install button is displayed on the toolbar. Click this button to install the dpk. If the Install button is invalid, compile it by pressing the compile button. Generally, the Install button is valid after compilation, 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
Dynamic Connection 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 first,
Select import ActiveX control from the component menu. In import ActiveX Control
In the displayed window, only the registered ActiveX control is displayed in the list. Select one and press install
Button to install. If regsvr32.exe is not used for registration, you can click the Add button to find the ocx file.
Register and then install it.
Notes:
1. check whether there is a description file after obtaining the component. Generally, there are instructions on how to install the component in the description file,
Some also have 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,
Set *. Pas, *. DCU, *. DCR, *. DP? Copy it to the lib directory of Delphi before proceeding.
3 As mentioned above, when installing the DCU component, the existing dclusr40.dpk is used,
You can also choose to install the package to a new package. If you select a new package, you must first take a name such as demo,
In fact, after installation, you can find demo. BPL, but not demo. dpk. Assume that you have
And want to install another component. If you want to install another component in dclusr40.dpk
After the installation, you will be prompted that the previously installed component has been canceled and you will not be able to use it. No
Can only one component be installed? The two components can be used at the same time unless you install them in a new package.
. Of course, every time you install a component to generate a new BPL file, there is no way to do it, but the BPL file is much more. Can I?
How many components are installed in dclusr40.dpk? Of course. The method is as follows: use open under the File menu
Open the dclusr40.dpk file, click the Add button, select the Add Unit page in the displayed dialog box, and press
Click the "Browse" button after the unit file name to open the component unit file and click OK. In this way, you can add
After adding the unit files of multiple components, click the compile button and then press the Install button.
If the file is compiled (DCU), you can directly press the Install button.
4. Delete the component. 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 the BPL component next time.
Then install and use.