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)
上一篇 2022年5月14日 上午9:00
下一篇 2022年5月14日 上午9:20


相关推荐

  • 软件测试方法大汇总

    软件测试方法大汇总软件测试方法种类繁多 记忆起来混乱 如果把软件测试方法进行分类 就会清晰很多 我参考一些书籍和网上的资料 把常用的软件测试方法列出来 让大家对软件测试行业有个总体的看法 nbsp 从测试设计方法分类 nbsp 测试名称测试内容 Blackbox 黑盒测试把软件系统当作一个 黑箱 无法了解或使用系统的内部结构及知识

    2026年3月17日
    1
  • 键盘失灵重启电脑就没事了_笔记本电脑重启后黑屏

    键盘失灵重启电脑就没事了_笔记本电脑重启后黑屏问题描述:下午,卸载了360软件(安全卫士、软件管家、360安全浏览器)后,重启电脑,然后电脑开始硬盘扫描、检测,结果告知不能成功修复。随后,我选择“继续使用Win10“选项,就发现电脑键盘已经失灵,无法输入开机密码,一度让我抓狂。在随后的的近3个小时的过程中,经历了以下调试过程:1.硬重启电脑(即,按住开机键不动,直到重启),发现没用2.重启后按F8、F10键试图进入安…

    2022年8月12日
    8
  • ChatGPT 中文版:GPT5 国内使用教程~(支持 GPT-5、GPT-4o、4o画图及o1、o3、o4)【2026年更新】 ​

    ChatGPT 中文版:GPT5 国内使用教程~(支持 GPT-5、GPT-4o、4o画图及o1、o3、o4)【2026年更新】 ​

    2026年3月16日
    4
  • haxm failed to open driver

    haxm failed to open driver今天在新的PC机上,安装android环境。PC的配置是CPU:i5,8G内存。在装intelhaxm-android.exe时候出错(见下图)。尝试:首先,查看了BIOS中对VT的支持,确定是支持并且开启状态。然后在网上试了安装haxm_extra_workaround.zip的方式,仍然不起作用。解决办法:重新安装另外一个版本的HAXM,见网址。安装后,成功解决。

    2022年6月28日
    27
  • python和pycharm安装包(附网盘地址)「建议收藏」

    python和pycharm安装包(附网盘地址)「建议收藏」「pycharm-community-2017.3.4.exe」等文件https://www.aliyundrive.com/s/kNz92RwkFTK提取码:dq74点击链接保存,或者复制本段内容,打开「阿里云盘」APP,无需下载极速在线查看,视频原画倍速播放。

    2022年5月13日
    52
  • Labview 上位机编写

    基于kvaser的Labview上位机编写实现数据接收和发送功能传感器协议解析数据接收以及动态分析诊断服务

    2022年4月6日
    75

发表回复

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

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