Delphi XE3 下安装ActiveX控件

http://blog.csdn.net/lee576/article/details/1770744


此英文文章来自codegear官方网站,但是是讲在BDS2006 下如何安装,我在delphi 2007下用此方法,一样通过,原文如下 

Description:

How to import an ActiveX control in BDS 2006?


Answer/Solution:

Here's the procedure for importing and installing an ActiveX control in BDS 2006.

(1)
Open BDS 2006 and select File | New | Package - C++Builder.

(2)
Select Component | Import Component, select the appropriate kind of component, then hit Next.

(3)
Click the Add button and select your .ocx, .dll, .tlb, and so forth, file. Highlight the component in the list of controls and hit Next.

(4)
Set the Palette Page (this is where the component will appear in the tool palette) and pay attention to the Unit Dir Name field. The Unit Dir Name is the directory where your component's .cpp, .h, and other files will be generated. Hit Next.

(5)
Select "Add unit to PackageName.bdsproj project" and hit Finish.

(6)
Bring up the Project Manager and right-click on the package (the .bpl file) and click Install. This will build, register, and install the component into the tool palette.

Some additional notes follow. These are not vital to the control importation process but will help explain what happens...

**
In step #5, if you don't want the component to be installed into the tool palette, then select "Create unit" instead. The generated files will go into the directory specified by Unit Dir Name, which is C:/Program Files/Borland/BDS/4.0/Imports by default, and can still be used in your code.

**
Be sure to save your package project. The .bdsproj file is your package's project file, and the .bpl file is the compiled package.



==========================下面是我看了以后实验的具体步骤===========================

How can I install an external ActiveX control (.OCX file) in Delphi 2007 ?

Click File  > New  > Package    
Save the Package project.  
Click Component  > Import Component
Select Import ActiveX control.  
Select ActiveX-control in list or click Add and browse the for file.  
Fill in component details, like name and palette page.  
Optionally set unit directory to same location as where you saved the package project.
Optionally check Generate component wrappers.  
Select Add unit to Package and Finish.
Right click on the Package in Project manager to Build and Install package.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值