Delphi ActiveX 控件向导

标签 delphi activex wizard

德尔福XE2

我是第一次尝试创建 ActiveX 控件。 步骤如下

1) 创建ActiveX库 2) 创建ActiveX控件 向导字段“组件名称”不显示我的 VCL 组件。该组件在已安装的软件包下可见,并且 .bpl 中的其他组件在“组件名称”下拉列表中可见。

为什么有些组件可见而其他组件不可见

TIA

以法莲

最佳答案

可以封装在 ActiveX 中的 VCL 控件必须是未标记为不兼容的 TWinControl 后代,并且已安装在 IDE 中或已将其单元添加到项目中。来自 Delphi docwiki (强调我的):

In the ActiveX Control wizard, select the name of the VCL control that will be wrapped by the new ActiveX control. The dialog lists all available controls, which are descendants of TWinControl that are not registered as incompatible with ActiveX using the RegisterNonActiveX procedure.

Tip: If you do not see the control you want in the drop-down list, check whether you have installed it in the IDE or added its unit to your project.

因此,您要做的第一件事是确保您的组件源自 TWinControl,而不仅仅是 TComponent

关于Delphi ActiveX 控件向导,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15024458/

相关文章:

c# - 如何在 c# 中的打包记录中读取固定大小字符串的 Delphi 数组

internet-explorer - 如何将ActiveX控件转换为NPAPI插件

com - 如何列出所有 ActiveX 控件?

java - SelectionListener 中的 JFace 关闭对话框

c# - 发布项目时,使用向导而不是仅提供 bin 文件夹有什么好处?

delphi - 在通话过程中,我的DirectShow筛选器使Skype 5.x崩溃。在4.x,Graph Edit和其他程序中运行良好

delphi - 如何更改外部声明函数的实现(绕行)

delphi - 我可以将类/记录方法链接到外部模块吗?

javascript和activex控制通信

jquery - 启用/禁用 asp :validators using jquery