How to install and uninstall a widget

Source: Internet
Author: User

Basic installation

1. For a single control, componet --> install Component... --> pas or DCU file --> install;
2. For control packages with *. dpk files, choose file --> open (select *. dpk from the drop-down list box) --> install;
3. For control packages with *. BPL files, install packages --> Add --> BPL file name;
4. If the above Install button is invalid, try the compile button;
5. Run Time Lib is used together with runtimepackes under packages under option.

If the prompt file cannot be found during compilation, the installation directory of the control is not in the lib directory of Delphi. There are two
Solution:
 
1. The uninstalled source file is exported to the lib directory of Delphi;
2. Add the control source code path to the lib directory of Delphi in tools --> environment options.
Note: whether the installed control is compatible with your Delphi version.
 
 

Control Deletion
Delete the packages in component/install packages.
Select component/configure palette...
There are two regions: pages and components.
Double-click the components area and select the control to be deleted. The delete button is available below.
However, the controls provided by the system can only be hide and cannot be deleted.
Open the control package file (*. dpk), delete the control file, and re-compile the package.
If you want to delete the entire control package, choose Project> Option> packages to delete the packages. OK ~

 

Help File Installation

Click the Customize menu item under the Help menu in Delphi. The openhelp dialog box is displayed,
Select the index page, open the add files menu under the edit menu, and add the Help menu you want to add.
You can use the help file in Delphi IDE.

 

Third-party control installation method

Components not provided by Borland are called third-party components:
Installation Method:

This section describes how to install common components.

1. There is only 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 existing package page, click "Browse" after "unit file name ".
In the dialog box, set "file type" to *. DCU, find the DCU file to be installed, and press OK to return "into existi
On the NG package page, click OK to install the package. Note: At this time, Delphi will prompt that dclusr40.dpk will be rebuilt.
, Whether to continue, OK. Install the component in the dclusr40.dpk package.
The output is a user-defined component package. install it in this package first. Next, let's talk about the precautions. After the installation is complete
After the component registration prompts and information on which page the component is installed, go to the component panel and check the information.
A new component page contains the newly installed components.

2. Only the PAS file or component with both the PAS and DCU files. This component has a PAS file, that is, the author
The source code is provided, which is much easier. 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. De
After lphi is upgraded, you can only install the PAS file to re-compile the package so that the component can adapt to the new Delphi version. This way
Components are worth using. According to the experience of xinling, it is best not to use components without source code. First, Delphi exists.
The version cannot be used after the upgrade. In addition, when the program encounters a problem, the user cannot debug the component to determine whether it is in the component.
A bug exists.

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 will not make dpk files, use the above method to publish
You can. For such a package, there will be a detailed installation instruction file, as mentioned above rxlib
Components are complex and installed in a sequential order. If the author does not provide installation instructions, you cannot install them correctly. If there is no security
Install the instruction file in the following method: Under the File menu, select "Open ..." Open the dpk file (File class
Select *. dpk in the type list box. In the displayed package window, there is an install button on the toolbar. Click this button to enter
Line installation. If the Install button is invalid, compile it by pressing the compile button.
The stall button is 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.
State Connection Library file (DLL ). To install such a package, select "Install" under the component menu.
Packages, and then click Add. In the open file dialog box, find the corresponding BPL file.
Click OK.

5. Install ActiveX controls. To install such a configuration, register with regsvr32.exe and select comp
Import ActiveX control in the onent menu. In the window opened by import ActiveX control, only
The registered ActiveX control appears in the list. Select one and press the Install button to install it. If
You can click the Add button to find the ocx file for real-time registration before installing regsvr32.exe.

 

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.
There will also be 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 As mentioned above, when installing the DCU component, the existing dclusr40.dpk is used. Of course, you can also choose
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 the installation is complete, the user
You can find demo. BPL, but cannot find demo. dpk. Assume that you have installed a component in dclusr40.dpk.
You want to install another component. If you want to install it again in dclusr40.dpk, you will be prompted that the original
The component has been canceled and you will not be able to use it. In this case, can only one component be installed? Unless you
Then install the package to a new package to use the two components at the same time. Of course, a new BPL file is generated every time a component is installed.
But BPL files have been added. Can I install several more components in dclusr40.dpk? Yes, of course.
. The method is as follows: Open the dclusr40.dpk file under the File menu, click the Add button, and in the displayed 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 them, click the compile button and then press instal.
L button. If the unit file is compiled (DCU), you can directly press the installation 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 and use the BPL component next time.

 

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.