Step 1:
Anyone who has used ActiveX knows that ActiveX cannot be recognized and used by the system if it is not registered. Generally, the installer automatically registers the ActiveX control it uses, but what if you need to manually register a widget? If you modify the registration table, it will be too annoying. There is a regsvr32.exe program under the systemfile folder of windows, which is the built-in ActiveX registration and anti-registration tool for Windows. Its usage is:
Regsver32
Regsvr32 [/S] [/n] [/I (: using line)] dllname
The dllname is the ActiveX control file name. We recommend that you copy it to the system folder before installation.
Parameters have the following meanings:
/U -- anti-Register Control
/S -- no matter whether the registration is successful or not, the prompt box is not displayed
/C -- console output
/I -- skip the control option for installation (different from registration)
/N -- do not register the control. This option must be used with the/I option.
For example, if you want to register an amovie. ocx control, you can enter regsvr32 amovie. ocx. You only need to use regsvr32/u amovie. ocx for anti-registration.
Regsvr32/s apiinex. dll registers the DLL file
Regsvr32/S/u apiinex. dll uninstall the DLL file
Regsvr32 register cut. ocx register the ocx file
Regsvr32/u uninstall cut. ocx uninstall OCX files
/S. dll,. ocx is not displayed after registration is successful.
/U. dll,. ocx uninstall
Step 2:
Delphi-> component-> Import ActiveX-> Find the registered OCX control and install it.