Delphi third-party Control installation Uninstall guide

Source: Internet
Author: User
Tags bmp image border color shuffle

1 Only one component of a DCU file. The DCU file is a compiled unit file, so the component is the author does not want to publish the source code. In general, the author must indicate which version of Delphi This component is suitable for, and if the version is incorrect, an error will occur at the time of installation. It is because there is no source code, to the user inconvenience, that is, once the Delphi version upgrade, this component can no longer be used, of course, some authors have given several versions of the DCU file, users choose to use as needed. The installation method for such a component is: In the Component menu, select Install Component, in the dialog box
Into the existing Package page, click the "Browse" button after "Unit file name", in the Open File dialog box, set "file type" to *.DCU, locate the DCU file to install, and press the OK button to return "into Existing Package page and then press the OK button to install. Note that at this time the Delphi will prompt DCLUSR40.DPK will be rebuilt, whether continue, OK. Here is the installation of components into the DCLUSR40.DPK package, this package from the file name can be seen as a user-defined component package, first installed in this package, the following are the notes. After installation there will be a message that the component has been registered and the information on which component page is installed, and so on to the palette, a new component page will typically appear with the components just installed.

2. Only PAS files or components that have both PAS and DCU files. This component because of the Pas file, that is, the author provides the source code, this is much better. The installation method and the above is the same, in the file type can be set to DCU can also be set to PAS, recommended to set as PAS, so that you can use Delphi recompile to see if there is a problem. After Delphi upgrade can only choose the Pas file installation, so as to recompile, so that the component can adapt to the new Delphi version. Such components are well worth using, according to the experience of the heart bell, no source components are best not to use, one is the Delphi version of the upgrade can not be used after the problem, moreover, when the program has a problem, the user cannot debug the component to determine whether there is a bug in the component.

3. A component package with DPK files. Component packages with DPK files are generally composed of multiple components, which means that after installation there will be multiple components for use, and if only one component author is generally not made into DPK files, it can be published using the above method. For such packages, there will generally be a detailed installation documentation, such as the rxlib mentioned above, due to the complexity of the components and the sequencing of the installation, the author does not provide installation instructions that the user does not install correctly. If you do not have the installation documentation, install it using the following method: Under the File menu, select Open dpk file (choose *.dpk in the Files of Type list box), and in the package window that appears, click the Install button on the toolbar. If the Install button is in an invalid state, then press the Compile button to compile, in general, after compiling the Install button will be in a valid state, then press the Install button is OK.

4. Package with BPL file. In general, this is also a component package consisting of a variety of components, which is actually a dynamic connection library file (DLL). For this package installation method is: Under the Component menu, select "Install Packages", and then click the Add button, in the Open File dialog box to find the corresponding BPL file open return, and then click the OK button.

5. Installation of ActiveX controls. To install this type of control, you need to first register with Regsvr32.exe and then select Import ActiveX Control entry in the Component menu. In the Import ActiveX Control Open window, only registered ActiveX controls appear in the list, select one and then press the Install button to install. If you have not registered with Regsvr32.exe in advance, you can press the Add button to find the OCX file for instant registration, register and then install.


A few notes:

1 after getting the components to see if there are documentation, generally in the documentation of how to install instructions, and some will
There are descriptions of the properties, events, and methods used by the components, which are very important when used.

2 before the above component (package) installation operation, it is best to copy *.BPL to your system directory and *.pas,
*.DCU, *.DCR, *.DP? Copy to Delphi's Lib directory.

3 before we mentioned the installation of DCU components, the choice is already existing dclusr40.dpk, of course, can also choose to install
To a new package, if you choose a new package, you need to take a first name, such as demo, in fact, after the installation of the user can
Find DEMO.BPL, and can not find DEMO.DPK. If you have installed a component into the DCLUSR40.DPK,
Also want to install another component, if installed in DCLUSR40.DPK, after installation you are prompted, the original installation of the
The component has been unregistered and you will not be able to use it. So it's not going to be the only one component that can be installed? Unless you re-
In a new package, both components can be used at the same time. Of course each installation of a component generates a new BPL file that also
No, but the BPL file is a lot more. Can you install several more components in the DCLUSR40.DPK? Of course it can.
Of Here's how: Open the Dclusr40.dpk file with the menu under the file, click the Add button, in the Open dialog
box, select the Add Unit page, press the "Browse" button after the unit file name to open the component unit files, OK,
In this way, you can add a unit file for multiple components, add it, click the Compile button, and then press
Install button, if the unit file is compiled (DCU), you can press the installation button directly.

4 removal of the component. Light will be installed can not, but also to delete it. Very simple, under the Component menu, select
Install packages, locate the installation BPL in the list, press the Remove button, ok! and erase the BPL file.
Completely, if you do not delete the BPL file, you can install it again next time by installing the BPL component.

Installing controls
Delphi 2006 Advanced Control App

Source: Computer News

    Second step: in Project Manager on the right, right-click the control name FLATSTYLE_D7.BPL and click "Install" in the pop-up menu. The control will be compiled and installed by Delphi 2006.

Installing controls

2. Installation of a single PAS file:
There are some third-party controls that have only one Pas file, no installation packages, and in Delphi 7, the PAS files can be installed separately, but in Delphi 2006, this feature has been canceled. So how do I install a single PAS file in Delphi 2006? Here's how:
First step: Click "Package–delphi for Win32" in the "File"-"new" menu to create a new control package.
New Control Package
The second step: select "Contains" folder in the right "Project Manager", click the right mouse button, select "Add" in the popup menu.
Add to
Third step: In the Add dialog box, click the "Browse" button, select the PAS file to install, and then click the "OK" button.
Select PAS File
Fourth step: Right-click "PACKAGE1.BPL" in the "Project Manager" and select "Install" in the pop-up menu, then the installation of the control is finished.
Fifth step: Save the BPL file.

Second, the Property editor control
1. Tvaluelisteditor
The Tvaluelisteditor control provided by Delphi 2006 can write an Object Inspector similar to Delphi7. Let's write a simple property editor as shown in the following:
Property Editor
First step: Place a Valuelisteditor control on the form (the control may be found in the Additional panel).
Step Two: Add property names and property values. In this example, we have a total of 3 properties, namely "Name", "Color", and "Size". Valuelisteditor provides us with a InsertRow method that allows you to add property names and property values. The code is as follows:
Valuelisteditor1.insertrow (' Name ', ', True);
Valuelisteditor1.insertrow (' Color ', ' clred ', True);
Valuelisteditor1.insertrow (' Size ', ' 9 ', True);
Isn't it very simple? Run the program, with the mouse click on the Size of 9, the effect is different? There is a drop-down list in the editor, so how do you do it? We will revise the third sentence as follows:
Index: = Valuelisteditor1.insertrow (' Size ', ' 9 ', True);
First gets the line number to be modified, and Inserrow returns the line number of the current row after inserting a row. Then use the Itemprops property to modify the properties of the row:
With Valuelisteditor1.itemprops[index-1]. PickList DO begin
ADD (' 9 ');
ADD (' 11 ');
ADD (' 13 ');
ADD (' 20 ');
PickList is the data in the next list that is saved.
Now run the program to see if the effect is the same?
Let's look at one more effect:
Editor with pop-up effect
There is a "..." after the clred in the figure. "button, in the Delphi 7, when this button appears, we can click this button to pop up a form, the corresponding property settings. Well, it is also very simple for us to achieve this effect, which will be "Valuelisteditor1.insertrow (' Color ', ' clred ', True); "This code is modified as follows:
Index: = Valuelisteditor1.insertrow (' Color ', ' clred ', True);
VALUELISTEDITOR1.ITEMPROPS[INDEX-1]. Editstyle: = esellipsis;
This effect can be achieved by modifying the Editstyle property in Itemprops to "esellipsis". However, now this button can do nothing, we need to join the execution code to play its role. In this example, we ask to click on "... button, the color dialog box pops up, and the color value selected by the user is displayed in the text box to the right of color. We can write the implementation code in the Oneditbuttonclick event:
Procedure Tform1.valuelisteditor1editbuttonclick (Sender:tobject);
Nrow: = Valuelisteditor1.row;
Case Nrow of
With Tcolordialog.create (nil) do
If Execute Then
Valuelisteditor1.cells[2, Nrow]: = colortostring (Color);
When clicked "... button, the Oneditbuttonclick event is triggered. In the Oneditbuttonclick event, we first use Valuelisteditor1.row to get the line number of the current "line", that is, which row of the mouse click is the button. Knowing the line number, we can add the corresponding code according to the line number. In this case, only the second line has "... button, so when Row equals 2 o'clock, we'll show the color dialog box. "Valuelisteditor1.cells[2, Nrow]: = colortostring (Color);" This code displays the color values selected by the user to the text box.
Through the above explanation, we know the addition and setting of the attribute record. So how do you get the property value of a property? Please see below:
If we want to get the property value of Name, we can get it using the following code:
ShowMessage (valuelisteditor1.cells[2, 1]);
Before we set the contents of the text box through the Cells property, we can use the Cells property to get the contents of the specified text box. Cells has 2 parameters, the first is a column, the second is a row. The property value of Name is in the 2nd column, the first row, because specify cells[2,1], if you want to get the value of the property of Size, then it should be cells[2,3].
Attribute/Method Description
DeleteRow deletes the specified line.
FindRow find rows.
ColCount gets the number of columns.
Itemprops.haspicklist whether a drop-down list is stabbed.
Values gets the value corresponding to key based on key.
Keys gets the value of Key RowCount gets the number of rows.

Third, System control
1. Ttrayicon in Delphi 2006, a new Ttrayicon control is added. The control is the icon used to display its own software in the tray. Using the Ttrayicon control makes it easy to implement the dynamic icon and bubble tip features. As shown in the following:
Pallet display
(1) Making of "bubble tip"
First step: Place the TrayIcon control in the form (found in the Additional panel).
Step Two: Set the icon for TrayIcon and load an ICO file.
Step three: Set TrayIcon's Balloonhint as "Delphi 2006 advanced Control App", set Balloontitle to "2005 years of Computer Report". Set the Visible to True.
Fourth step: Double-click the form to write the following code in the OnCreate event: Trayicon1.showballoonhint;
OK, F9 run the program, a "bubble tip" will appear on the icon. The Balloontimeout property is set to "bubble tip" disappears after a few seconds, the default is 3 seconds.
(2) Dynamic icon
As we all know, when there is QQ message, there will be a flashing icon in the tray, using the TrayIcon control can be very easy to implement this function.
Make the icon move, in fact, use multiple icons to switch. QQ flashing icon, in fact, is the use of two icons to switch, one is the Avatar icon, an empty icon.
Below we will simulate QQ avatar flashing function:
First step: Place the ImageList control on the form (as you can find in the Win32 panel).
Step two: Set the Width and Height property of the ImageList control to 32, then double-click ImageList and click the "Add" button to add the icon file. The first one to add is the icon to be displayed, the second to add an empty icon (you can use Image Editor to create a new ICO file, and then save it directly to get an empty icon.) )。
Step three: Set the Icons property of TrayIcon to ImageList1 (you can select directly from the list).
Fourth Step: Add the following code to the Form1 onformshow event:
Trayicon1.animate: = True;
Trayicon1.animateinterval: = 450;
When Animate is True, the order of the icons in the ImageList control is automatically displayed sequentially, creating a dynamic effect. Animateinterval Displays the next icon for every number of times. If you want to stop blinking, set Animate to False.
How about the Ttrayicon control provided by Delphi2006 is not cool.

Attribute/Method Description
Animate sets whether to use dynamic icons.
Animateinterval the time of the icon change.
Balloonflags the icon in the bubble tip.
Bferror as Error icon
Bfinfo For information icons
Bfwarning is a warning icon.
Balloontimeout Bubble Tip vanishing time.
Balloontitle Bubble tip title.
Hint tray icon tip.
Displayed when the mouse is moved to the icon in the tray.
icon to set the tray icons.
IconIndex icon Index.
Icons icon Collection. General use of the ImageList control contains the collection of icons.
Visible is displayed in the tray.

Iv. Interface Controls
1. Xpmenu
The Xpmenu control helps us make it easy to create XP-style menus. This is a third-party control, which explains the "installation of a single PAS file", which is explained in Xpmenu as an example. First we use Tmainmenu or Tpopupmenu to make the menu, then drag the Txpmenu control onto the form in the XP panel, and set the Xpmenu's Active and AutoDetect properties to True. If we want to define the background color of the menu, the border color, even the size and color of the font, it is also very easy. The following table is a property that modifies the menu, Font Color: Property Description Selectbordercolor The border color when the menu is selected selectcolor the background color of the selected menu Selectfontcolor the color of the text when the menu is selected Separator The color font of the divider line sets the font, size, color 2. FlatStyle FlatStyle is a set of flat controls. If you want your interface to be different, then using FlatStyle is the best choice. Tflattitlebar Tflattitlebar simulates the title bar control. The effect looks like this: the Simulation title bar control places Flattitlebar on the form, and then sets the Align property to Altop, because there is a default title bar in the form, so we need to set the BorderStyle of the form to None to remove the title bar. Tflathint Flathint changed the standard message box style for Windows. The effect is as follows:
Change effect as long as we set the Hint property for the control and set Showhint to True, drag the Tflathint control onto the form. Since the Tflathint default font is English, the characters displayed are small, just set the Flathint font property to Chinese. Five, multimedia control 1. Twinampcomponent This control can help us manipulate Winamp. Control Winamp Some common Winamp methods:; Play Music Winampcontrol1.prevtrack; Previous music Winampcontrol1.pause; pauses playback of winampcontrol1.stop; Stop playing winampcontrol1.nexttack; Next Music winampcontrol1.setvolume Set volume winampcontrol1.getsonglength get music length winampcontrol1.setrepeat; Set repeated playback winampcontrol1.clearrepeat; Clear duplicate playback winampcontrol1.setshufle; Set the shuffle to play winampcontrol1.clearshufle; Clear Shuffle winampcontrol1.clearplaylist; Clear Playlist

Winampcontrol1.addfile Add music winampcontrol1.adddir Add directory 2. Audio Components suite, a set of cross-platform voice processing packages: Supports audio playback, capture, CD-ROM playback, CDDA capture, Wave streaming support, MP3, Ogg, FLAC, M OnKey format support, audio reverb processing, input device dynamic capture, audio format conversion, sound audio indicator, other effects. Recording example: The first step: Add Taudioin, twaveout to the form. Step two: Set the related properties of AudioIn1 and WaveOut1: audioin1.insamplerate: = 44100; Audioin1.inbitspersample: = 16; Audioin1.inchannels: = 2; Audioin1.rectime: = 30; Waveout1.filename: = Savedialog1.filename; Step three: Start recording; A simple recording program is ready to write. If you want to stop recording, you can use Waveout1.stop. Vi. file Manipulation controls 1. Teasyfilesearch Teasyfilesearch a component to search for files, supports sub-directory searches, supports wildcards (*. *, *.exe, ...) filtering. You can search by the minimum file size, maximum file size, and file date. Search File Search Example: First add Teasyfilesearch, TButton, TListView controls to the form. Then double-click the Button1 control and enter the following code: Easyfilesearch1.rootpath: = ' \ c ’ ; EasyFileSearch1 searchoptions: = [Okincludesubfolder] EasyFileSearch1.FileNames.Clear; EASYFILESEARCH1.FILENAMES.ADD (' *. * ');; The above 4 lines of code will be able to search all the files under the C disk. SearchOptions is set to Okincludesubfolder to indicate the search sub-directory. How to get the searchWhere's the file? We can use the OnFileFound event. The code is as follows: Procedure Tform1.easyfilesearch1filefound (filefound:tfileinformations); var Newitem:tlistitem; time:string; Begin {Add found file} newitem: = ListView1.Items.Add; With NewItem do

Begin Caption: =; SubItems.Add (Filefound.path); Time: = IntToStr (FileFound.Time.CreationTime.wDay) + '/'; Time: = Time+inttostr (FileFound.Time.CreationTime.wMonth) + '/'; Time: = Time+inttostr (FileFound.Time.CreationTime.wYear); SubItems.Add (time); SubItems.Add (IntToStr (filefound.size)); End End 2. Disk controls disk controls make it easier to develop related developments such as hard drives, floppy disks, CDs, memory, networking, enclosures, and file systems. Component introduction and how to use: (1) Dcdiskscanner is used to find files. Example code: Dcdiskscanner1.folder: = ' \ n '; Dcdiskscanner1.searchmask: = ' *.bmp '; Dcdiskscanner1.includesubfolders: = True; Contains subdirectories Dcdiskscanner1.execute; Perform a search to get the files found in the OnFileFound event: procedure Tform1.dcdiskscanner1filefound (sender:tobject; const FileName, FileType: String Const filesize:extended; Const Filetime:tdatetime; Const fileattributes:tdcscanattributes; Const LargeIcon, Smallicon:ticon; Sysimageindex, Totalfiles:integer; Const totalsize:extended); Begin LISTBOX1.ITEMS.ADD (FileName); End (2) Dcmultidiskscanner the function and use of the control is similar to the Dcdiskscanner. DcmultidiskscAnner adds a filter file to the properties excludelist, the list contains files that will not be searched. (3) Dcfileoperations the control can copy, delete, move, rename multiple files or folders. Example code: DCFILEOPERATIONS1.FILELIST.ADD (' c:\test.txt '); Dcfileoperations1.destfolder: = ' d:\ '; Dcfileoperations1.operation: = focopy; Dcfileoperations1.execute; (4) Dcfoldermonitor Monitor folder is deleted, copied, renamed the action. Example code: Dcfoldermonitor1.folder: = ' d:\ '; Dcfoldermonitor1.filter: = [Fmfilename]; = True; Monitor the D drive, which triggers the OnChange event when the file name in the D drive is changed. (2) dcvirtualdrives create virtual disk.

Virtual Disk Sample code: Procedure Tform1.button1click (Sender:tobject); Begin if Dcvirtualdrives1.adddrive (' H ', ' D:\Music ') then ShowMessage (' Add success! ‘); End When we close the program, we should use Dcvirtualdrives1.deletedrive (' H '); Delete the virtual disk. (6) Dcdiskinfo get disk information. After you specify Disk, you can get information by accessing the relevant properties of Dcdiskinfo. (7) Dcfileinfo get the file information. After you specify FileName, you can get information by accessing the related properties of Dcfileinfo. (8) DCFILECRC gets the CRC value of the file. (9) Dcversioninfo Gets the version information of the file. It is mainly used to obtain the version information of EXE, DLL and OCX files. () Dcshellicon Gets the icon for the file association. (one) Dcshelllink gets the file that the shortcut points to. Dcshellproperties displays the specified file, the folder's property box, and the right-click menu. Dcicon2bitmap can convert an icon file to a BMP image. Delphi's VCL has brought great convenience to our development program. Powerful, rich and colorful third-party controls make us even more capable.

Delphi third-party Control installation Uninstall guide

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: 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.