Installing an ActiveX - Delphi
This is a discussion on Installing an ActiveX - Delphi ; Having trouble installing an ActiveX into Delphi2005, can anybody tell me
what I'm doing wrong:
I tried to create the class in Delphi by doing the following :
1. Ran regsvr32 on the ocx file "<windowssystem>/zkemkeeper.dll" - replies
ok.
2 ...
-
Installing an ActiveX
Having trouble installing an ActiveX into Delphi2005, can anybody tell me
what I'm doing wrong:
I tried to create the class in Delphi by doing the following :
1. Ran regsvr32 on the ocx file "<windowssystem>/zkemkeeper.dll" - replies
ok.
2 Open Delphi and go Component | Import Component | Import ActiveX Control.
3. Select ZKEMKeeper 6.0 Control (the result of step 1).
4. Import into the selected Palette page and directories all look good.
5. The last step has 2 options, I have tried both Create Unit and Add unit.
6. A file called "zkemkeeper_TLB.pas" is opened and will compile and the
dcr, pas and dcu files are where they should be.
After step 6 the control (TCZKEM) is not in the palette and Delphi knows
nothing about the class (opening the project generates "Class TCZKEM not
found").
I might be wrong, but wouldn't Delphi have to rebuild itself in order to
register the new component ?
Regards
Ed
-
Re: Installing an ActiveX
Ed wrote:
> Having trouble installing an ActiveX into Delphi2005, can anybody tell me
> what I'm doing wrong:
>
> I tried to create the class in Delphi by doing the following :
>
> 1. Ran regsvr32 on the ocx file "<windowssystem>/zkemkeeper.dll" - replies
> ok.
>
> 2 Open Delphi and go Component | Import Component | Import ActiveX Control.
>
> 3. Select ZKEMKeeper 6.0 Control (the result of step 1).
>
> 4. Import into the selected Palette page and directories all look good.
>
> 5. The last step has 2 options, I have tried both Create Unit and Add unit.
>
> 6. A file called "zkemkeeper_TLB.pas" is opened and will compile and the
> dcr, pas and dcu files are where they should be.
>
> After step 6 the control (TCZKEM) is not in the palette and Delphi knows
> nothing about the class (opening the project generates "Class TCZKEM not
> found").
>
> I might be wrong, but wouldn't Delphi have to rebuild itself in order to
> register the new component ?
Not at all. It only needs to compile a package. That's where all the
components are kept. Delphi can load multiple packages at once, so you
don't need to disturb the Delphi-supplied packages to install new
components.
Delphi creates a unit for you. You need to put that unit in a package.
Delphi provides one named dclusr, which you're welcome to use for that.
Otherwise, you can create your own new package. Add your COM unit to the
package's "contains" section, compile the package, and install it.
--
Rob
-
Re: Installing an ActiveX
Thank you.
One last question - what is the COM unit ?
Ed
"Rob Kennedy" <me3@privacy.net> wrote in message
news:48672fd1@newsgroups.borland.com...
> Ed wrote:
>> Having trouble installing an ActiveX into Delphi2005, can anybody tell me
>> what I'm doing wrong:
>>
>> I tried to create the class in Delphi by doing the following :
>>
>> 1. Ran regsvr32 on the ocx file "<windowssystem>/zkemkeeper.dll" -
>> replies ok.
>>
>> 2 Open Delphi and go Component | Import Component | Import ActiveX
>> Control.
>>
>> 3. Select ZKEMKeeper 6.0 Control (the result of step 1).
>>
>> 4. Import into the selected Palette page and directories all look good.
>>
>> 5. The last step has 2 options, I have tried both Create Unit and Add
>> unit.
>>
>> 6. A file called "zkemkeeper_TLB.pas" is opened and will compile and the
>> dcr, pas and dcu files are where they should be.
>>
>> After step 6 the control (TCZKEM) is not in the palette and Delphi knows
>> nothing about the class (opening the project generates "Class TCZKEM not
>> found").
>>
>> I might be wrong, but wouldn't Delphi have to rebuild itself in order to
>> register the new component ?
>
> Not at all. It only needs to compile a package. That's where all the
> components are kept. Delphi can load multiple packages at once, so you
> don't need to disturb the Delphi-supplied packages to install new
> components.
>
> Delphi creates a unit for you. You need to put that unit in a package.
> Delphi provides one named dclusr, which you're welcome to use for that.
> Otherwise, you can create your own new package. Add your COM unit to the
> package's "contains" section, compile the package, and install it.
>
> --
> Rob
-
Re: Installing an ActiveX
Ed wrote:
> Thank you.
>
> One last question - what is the COM unit ?
The only unit you have. The one the type-library importer created for
you. (ActiveX is a subset of COM.)
--
Rob