Delphi2007 下安装ActiveX控件[通俗易懂]

Delphi2007 下安装ActiveX控件[通俗易懂]此英文文章来自codegear官方网站,但是是讲在BDS2006 下如何安装,我在delphi2007下用此方法,一样通过,原文如下 Description:HowtoimportanActiveXcontrolinBDS2006?Answer/Solution:Herestheprocedureforimportingandinstalling

大家好,又见面了,我是你们的朋友全栈君。

此英文文章来自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.

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/146432.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • Python中“取整”的各种问题[通俗易懂]

    Python向上取整的算法一、初衷:  有时候我们分页展示数据的时候,需要计算页数。一般都是向上取整,例如counts=205pageCouts=20,pages=11页。一般的除法只是取整数部分,达不到要求。二、方法:1、通用除法:  UP(A/B)=int((A+B-1)/B)  取临界值,计算下A+B-1的范围就OK.2、Python除法:…

    2022年4月17日
    91
  • BM3D的学习与Matlab实现「建议收藏」

    BM3D的学习与Matlab实现「建议收藏」                    BM3D的学习与Matlab的实现      BM3D是2007年TIP的文章,题目是《ImageDenoisingbySparse3-DTransform-DomainCollaborativeFiltering》。最近想尝试一下图像去噪,看看能否应用到项目中,顺便测试了一下效果,结果不…

    2022年5月2日
    31
  • 安卓Activity跳转的几种方式

    安卓Activity跳转的几种方式本文转载于http://blog.sina.com.cn/s/blog_5140274d0100q4j7.html,本人仅作为学习交流之用,请大家尊重原创。第一种方式,用action来跳转。使用Action跳转,如果有一个程序的AndroidManifest.xml中的某一个Activity的IntentFilter段中定义了包含了相同的Action那么这个Intent就与这个目标Ac…

    2022年5月11日
    44
  • 解析类型后加问号和双问号

    变量定义中类型后带一个问号,意思是这个数据类型是NullAble类型的。用于给变量设初值的时候,给变量(int类型)赋值为null,而不是0!例子: int?i=3等同于Nullab

    2021年12月27日
    45
  • Metabase 从 H2 迁移到 MySQL 踩坑指南[通俗易懂]

    Metabase 从 H2 迁移到 MySQL 踩坑指南[通俗易懂]Metabase 从 H2 迁移到 MySQL 踩坑指南

    2022年4月21日
    50
  • Pycharm配置git环境「建议收藏」

    Pycharm配置git环境「建议收藏」Pycharm配置git环境在网上查了一些发现都已经过时了,有的根本没办法用,自己摸索了一下午。捣鼓的差不多了至少可以用hhhh默认各位老铁都已经安装好了,Git咯,并且有自己的github网址或者gitee网站咯0X1创建一个新项目首先新键一个新的项目,直接creat就好了创建好了如下:0X2匹配GitFile->Settings->VersionControl->Git详情如下:找到Setting,点击进入找到VersionControl,

    2022年8月28日
    2

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号