XE 创建 Active Form
XE6:
http://docwiki.embarcadero.com/RADStudio/XE6/en/Generating_an_Active_Form_Based_on_a_VCL_Form
http://docwiki.embarcadero.com/RADStudio/XE8/en/Creating_a_VCL_Forms_ActiveX_Active_Form
http://docwiki.embarcadero.com/RADStudio/Seattle/en/Using_ActiveX_Controls_Index
Generating an Active Form Based on a VCL Form
Go Up to Using ActiveX controls Index
Unlike other ActiveX controls, Active Forms are not first designed and then wrapped by an ActiveX wrapper class. Instead, the Active Form wizard generates a blank form that you design later when the wizard leaves you in the Form Designer.
You can test an Active Form by creating an HTML page to contain a reference to the Active Form and specify its location on the page. The Active Form can then be displayed and run from a Web browser. Inside the browser, the form behaves just like a stand-alone Delphi form. The form can contain any VCL components or ActiveX controls, including custom-built VCL controls.
To start the Active Form wizard:
- Choose either:
- File > New > Other > Delphi Projects > ActiveX > ActiveX Library
- File > New > Other > C++Builder Projects > ActiveX > ActiveX Library
- This creates a Dynamic Link Library [DLL] project that you can use to host in-process ActiveX Objects.
- Now choose either:
- File > New > Other > Delphi Projects > ActiveX > Active Form
- File > New > Other > C++Builder Projects > ActiveX > Active Form
On the Active Form wizard, you cannot specify the name of the VCL class to wrap. This is because Active forms are always based on Vcl.AxCtrls.TActiveForm.
You can change the default names for the CoClass, implementation unit, and ActiveX library project. Similarly, this wizard lets you indicate whether you want your Active Form to require a license, whether it should include version information, and whether you want an About box form.
When you exit the wizard, it generates the following:
- An ActiveX Library project file, which contains the code required to start an ActiveX control. You usually don't change this file.
- A type library, which defines a CoClass for your control, the interface it exposes to clients, and any type definitions that these require. For more information about the type library, see Working with Type Libraries - Overview.
- A form that descends from AxCtrls.TActiveForm. This form appears in the Form Designer, where you can use it to visually design the Active Form that appears to clients. Its implementation appears in the generated implementation unit. In the initialization section of the implementation unit, a class factory is created, setting up Vcl.AxCtrls.TActiveFormControl as the ActiveX wrapper for this form.
- An About box form and unit if you requested them.
- An .LIC file if you enabled licensing.
At this point, you can add controls and design the form as you like.
After you have designed and compiled the Active Form project into an ActiveX library (which has the OCX extension), you can create a test HTML page that contains a reference to the Active Form. Then you can test the project using an ActiveX-enabled Web browser. For instructions, see Creating a VCL Forms ActiveX Active Form.
XE:
http://docwiki.embarcadero.com/RADStudio/XE/en/Generating_an_ActiveX_Control_Based_On_a_VCL_Form
Unlike other ActiveX controls, Active Forms are not first designed and then wrapped by an ActiveX wrapper class. Instead, the ActiveForm wizard generates a blank form that you design later when the wizard leaves you in the Form Designer.
When an ActiveForm is deployed on the Web, Delphi creates an HTML page to contain the reference to the ActiveForm and specify its location on the page. The ActiveForm can then displayed and run from a Web browser. Inside the browser, the form behaves just like a stand-alone Delphi form. The form can contain any VCL components or ActiveX controls, including custom-built VCL controls.
To start the ActiveForm wizard:
- Choose File > New > Other to open the New Items dialog box.
- Select the tab labeled ActiveX under the language you are using (Delphi or C++).
- Double-click ActiveX Library. This creates a Dynamic Link Library [DLL] project that you can use to host in-process ActiveX Objects.
- Choose File > New > Other again.
- Select the ActiveX tab again.
- Double-click the ActiveForm icon.
On the Active Form wizard, you can't specify the name of the VCL class to wrap. This is because Active forms are always based on AxCtrls.TActiveForm.
You can change the default names for the CoClass, implementation unit, and ActiveX library project. Similarly, this wizard lets you indicate whether you want your Active Form to require a license, whether it should include version information, and whether you want an About box form.
When you exit the wizard, it generates the following:
- An ActiveX Library project file, which contains the code required to start an ActiveX control. You usually don't change this file.
- A type library, which defines and CoClass for your control, the interface it exposes to clients, and any type definitions that these require. For more information about the type library, see Working with Type Libraries - Overview.
- A form that descends from AxCtrls.TActiveForm. This form appears in the form designer, where you can use it to visually design the Active Form that appears to clients. Its implementation appears in the generated implementation unit. In the initialization section of the implementation unit, a class factory is created, setting up AxCtrls.TActiveFormControl as the ActiveX wrapper for this form.
- An About box form and unit if you requested them.
- A .LIC file if you enabled licensing.
At this point, you can add controls and design the form as you like.
void __fastcall InitializeControl()
{
m_VclCtl->OnActivate = ActivateEvent;
// m_VclCtl->OnAfterMonitorDpiChanged = AfterMonitorDpiChangedEvent;
// m_VclCtl->OnBeforeMonitorDpiChanged = BeforeMonitorDpiChangedEvent;
m_VclCtl->OnClick = ClickEvent;
m_VclCtl->OnCreate = CreateEvent;
m_VclCtl->OnDblClick = DblClickEvent;
m_VclCtl->OnDeactivate = DeactivateEvent;
m_VclCtl->OnDestroy = DestroyEvent;
m_VclCtl->OnMouseEnter = MouseEnterEvent;
m_VclCtl->OnMouseLeave = MouseLeaveEvent;
m_VclCtl->OnPaint = PaintEvent;
}
XE 创建 Active Form的更多相关文章
- JavaScript 创建一个 form 表单并提交
<!DOCTYPE HTML> <html lang="en-US"> <head> <meta charset="UTF-8& ...
- Swing 解决 idea 找不到创建gui form的问题
果然,寄希望于百度google不如自己动手,还是得吃透文档, 然后就是对于别人的博客要严格对照步骤来,否则都容易达不到效果 这边gui form在idea下找不到创建,百度google一个说的也没有, ...
- django----多对多三种创建方式 form组件
目录 多对多三种创建方式 全自动 全手动 半自动 form组件 基本使用 form_obj 及 is_valid() 前端渲染方式 取消前端自动校验 正则校验 钩子函数(Hook方法) cleaned ...
- Windows Serer 2003 配置手册 – 创建Active Dictionary域
域与工作组的关系 实际上我们可以把域和工作组联系起来理解,在工作组上你一切的设置在本机上进行包括各种策略,用户登录也是登录在本机的,密码是放在本机的数据库来验证的.而如果你的计算机加入域的话,各种策略 ...
- oracle xe 创建表空间
使用OracleXE控制台,我们会发现一个奇怪的现象:没有提供创建表空间.增加数据文件等功能.这似乎和我们使用Oracle标准版控制台不一样. 其实在OracleXE中可以创建新的表空间,不过一般情况 ...
- c++builder Active Form
新增的属性.方法刷新一下才可以生成方法的实现.保存按钮不生成,刷新就好了. Refresh Implemention
- Delphi发布ActiveX控件 制作CAB包 数字签名相关
文件: SignTool.rar 大小: 84KB 下载: 下载 最近我正在研究ActiveX技术.我使用Delphi 7创建了一个具有ActiveForm的ActiveX控件应用程序.这个控件产生一 ...
- Django - Form嵌套的Meta类 + 为什么type()能创建类
Form里面嵌套了一个Meta类 class PostForm(forms.ModelForm): class Meta: model = Post # field to be exposed fie ...
- Delphi ActiveX Form的使用实例
Delphi ActiveX Form的使用实例 By knityster 1. ActiveX控件简介 ActiveX控件也就是一般所说的OCX控件,它是ActiveX技术的一部分. ActiveX ...
随机推荐
- LG4454 【[CQOI2018]破解D-H协议】
先谈一下BSGS算法(传送门) 但是上面这位的程序实现比较繁琐,看下面这位的. clover_hxy这样说 bsgs算法,又称大小步算法(某大神称拔山盖世算法). 主要用来解决 A^x=B(mod C ...
- MySQL Disk--磁盘相关参数
/sys/block/sda/queue/nr_requests 磁盘队列长度.默认只有 128 个队列,可以提高到 512 个.会更加占用内存,但能更加多的合并读写操作,速度变慢,但能读写更加多的量 ...
- stenciljs 学习四 组件装饰器
stenciljs 可以方便的构建交互式组件 支持以下装饰器 component prop watch state method element component 说明 component 包含ta ...
- adnanh webhook 框架 hook 定义
Hook hook 是一个SON对象.钩子对象必须包含id和execute-command属性.所有其他属性都被视为可选. 属性 id - 指定hook的ID.方式格式(http://server:p ...
- POJ3613 k边最短路
题目:http://poj.org/problem?id=3613 Floyd求最短路的实质是矩阵的自乘.( i , k )是第 i 行第k列,( k , j )是第k行第 j 列:用它们的max更新 ...
- codevs2189数字三角形(%100)
题目:http://codevs.cn/problem/2189/ %100的话就加一维状态.把最优性改为可行性(存在性). #include<iostream> #include< ...
- 用7z.exe 压缩整个文件夹里的内容
以下是批处理中的内容: 7z.exe a -tzip zmv9netSrc.zip "D:\IE收藏夹备份\*"pause7z.exe a -tzip zmv9netSrc.zip ...
- 编程中检查IIS7组件的安装情况
http://learn.iis.net/page.aspx/135/discover-installed-components/说明:ASP.NET网络应用程序在IIS7上部署的时候,经常会要求预装 ...
- 【H3C交换机】cpu各个进程的详细说明
display cpu-usage命令用来查看设备CPU占用率的统计信息,以及各个进程的cpu占用率. 各个进程详细说明如下,不同软件版本.盒式和框式的cpu进程略有不同,详细信息可以查看手册中的命令 ...
- git 场景 :从一个分支cherry-pick多个commit
场景: 在branch1开发,进行多个提交,这是切换到branch2,想把之前branch1分支提交的commit都[复制]过来,怎么办? 首先切换到branch1分支,然后查看提交历史记录,也可以用 ...