Re: How do I add ActiveX control in Delphi 2005
[ Delphi Tutorials -- by DelphiLand ]
Posted by webmaster Guido on January 16, 2005
In Reply to: Re: How do I add ActiveX control in Delphi 2005 posted
by webmaster Guido on January 14, 2005
: : I am new to Delphi, but I have been programing in Visual Basic for years. I decided I should try the switch to Delphi. This means I have a personal library of many unique ActiveX controls. I have tried to add a couple of them into the Tool Palette in Delphi 2005 but had not gotten it to work.
: : Can someone help me with the steps to import ActiveX controls into the Tool Palette in Delphi 2005 for win32?
Importing an ActiveX control is pretty much the same for all versions of Delphi:
1. Select Component / Import ActiveX Control.
2. In the dialog window that opens, select the ActiveX control that you wish to import, for example: "CCRP Animation Control" (CCRPANI6.OCX).
In the box labeled "Class names", you will see the classes that are contained in this ActiveX; in my example, this was only one class: TccrpAnimation.
3. In the same dialog, select the "Palette Page" where you wish to add the component(s). You can
leave the ActiveX option selected.
4. Click the Install button.
5. Select an existing package where the new control(s) must be installed, or
create a new package.
6. Click OK.
7. Delphi will ask you whether you want to rebuild the package or not. Click the Yes button.
8. After the package is compiled, Delphi says in a message that the new ActiveX component is registered, TccrpAnimation in our example. Click OK.
9. Close the package detail window.
The new component is now available on the ActiveX component palette page, or on another palette page if you changed this in step 3. It's ready to be used in your applications.
1. The ActiveX component is linked into the executable file of your program that you uses this component. However, you MUST ALSO distribute the .OCX file with your application!
2. An ActiveX control needs to be registered on the computer before its first use. Thus, on every computer where you install an application that uses your ActiveX.
Installation programs, such as InstallShield, automatically take care of this registration.
Related Articles and Replies
[ Delphi Forums and
Tutorials -- by DelphiLand ]