Available in the LEADTOOLS Imaging toolkit. |
Upgrading a Delphi 4.0 Application to Use LEADTOOLS 16
These instructions describe how to upgrade a Delphi 4.0 application from LEADTOOLS 12.1 to LEADTOOLS 16. You can also follow these instructions when upgrading from an earlier version of LEADTOOLS.
Upgrading requires the following steps:
1. Install LEADTOOLS 16. Note the following:
By default LEADTOOLS 16 is installed into a different folder than previous versions.
Nevertheless, in Delphi, only one version of the LEAD control can be used. Therefore, you must complete the remaining steps in these instructions whenever you want to use a different version of the LEADTOOLS ActiveX.
2. Open your project and remove each old LEAD control as follows. (You can use the tab key to make sure that you find all of the controls on a form.)
a. Before removing a control, note all of the events where procedures are assigned. Later, you will have to reassign them to the new control.
b. Also, before removing a control, note the control name, and any other properties that you may need to assign to the new control. (You only need to note properties that are set to non-default values at design time.)
c. Press the Delete key to remove the control.
3. Close your project.
4. Remove the old LEAD icon from the toolbar as follows:
a. On the File menu, select the Open option.
b. Select the Delphi4\Lib directory, highlight dclusr40.dpk and click Open.
c. In the Contains folder, delete the LEAD .dcr and .pas files.
d. On the DCLUSR40.dpk dialog, click on Compile. The Compiling package dclusr40 dialog appears. Click Yes in this dialog.
e. After compiling has finished, click OK in the Information dialog.
f. Close and Save dclusr40.dpk.
5. Install the new LEAD control as follows:
a. On the main menu, select the Component->Import ActiveX Control option.
b. Highlight the LEAD Main ActiveX Control (16). Change the class name to TLEAD. Click Install. A Confirm dialog will appear indicating that the LEADLib_TLB.pas file already exists and asking if you want to replace it. Click Yes.
c. In the Install dialog, click OK.
d. In the Confirm dialog, click Yes. You will also see the Compiling package dclusr40 dialog confirming that dclusr40 will be compiled. Click Yes.
e. After compilation has finished, click OK in the Information dialog.
f. At this point you will be presented with the DCLUSR40.pas window, with lines pertaining to the new LEAD control. Save the DCLUSR40 project.
6. Replace the imported LEADDEF.PAS file. To do so, take the following steps:
a. Reopen your project.
b. On the main menu, select the Project > Remove from Project option, and remove the current LEADDEF.PAS file.
c. Select the Project > Add to Project option, and add the LEADDEF.PAS file from the LEADTOOLS 16 INCLUDE folder.
7. Add each new LEAD control as follows:
a. Select the LEAD icon and draw the control on the form.
b. In the Object Inspector, specify the Name and any other non-default properties that you noted earlier.
c. In the Object Inspector, specify any event procedures that you noted earlier. (You can choose them from the list box.)
8. Run your application to test it.