-
嘿嘿,大侠看到不要见笑呀...
大家都知道使用DLL的好处.于是我就想把FORM封装到DLL里面去.
到网上找,发现是MDI和模式窗体的,非模式的也有...
嘿嘿,大侠看到不要见笑呀...
大家都知道使用DLL的好处.于是我就想把FORM封装到DLL里面去.
到网上找,发现是MDI和模式窗体的,非模式的也有很多问题.便想自己解决这个问题.
原来是用DLL创建一个对象返回,但发现有很多的问题.
想了半天就去寻根问柳吧.
找到了类.
我就想把类封装进DLL,到时简单的返回一个类,然后在主程序里操作不就简单了?
找了半天发现了TFormClass,于是试了试从DLL导出来,像一般的程序一样创建窗体发现成功.
接着我又想看看其他的类是不是也能这样,就拿TFrame来实验.
function GetDllFrameClass():TFrame stdcall
第一次是这样声明的,失败.奇怪?!
试了好多次都不行,就想到了TFormClass(Ctrl+左键),进去看看,发现是这样声明的.
TFormClass = class of TForm
哎呀,恍然大悟!!
class(TFrame) 是声明一个类, 这个类继承了TFrame类 f: TFrame 是一个对象
class of TFrame 声明的是类类型, f:TFrameClass 是一个类.
function GetDllFrameClass():TFrame
返回就不是类而是对象了,照TFormClass修改后TFrameClass = class of TFrame
运行...成功,
- 2022-01-31 01:59:09下载
- 积分:1
-
插座。通道图像
socket. channel image
- 2022-01-26 03:15:06下载
- 积分:1
-
professional keylogger source code by delphi
professional keylogger source code by delphi
- 2023-01-13 05:45:04下载
- 积分:1
-
学生选课系统,查找、增加,删除学生,查找、增加、删除课程。...
学生选课系统,查找、增加,删除学生,查找、增加、删除课程。-Student elective system, search, add, delete students, search, add, delete courses.
- 2022-12-23 16:30:05下载
- 积分:1
-
delphi rs232_comm dizhongheng
delphi rs232_comm dizhongheng -delphi rs232_comm dizhongheng
- 2023-09-01 01:30:04下载
- 积分:1
-
将部份信息储存於可执行文档 (.EXE ) 中的技巧,制作出简单、防止非法复制软件的的非可视构件的源代码 2.15 版...
将部份信息储存於可执行文档 (.EXE ) 中的技巧,制作出简单、防止非法复制软件的的非可视构件的源代码 2.15 版-Some of the information stored in the executable file (. EXE) of the skills, to produce simple, to prevent illegal copying of software non-visual component of the source code version 2.15
- 2022-02-12 18:56:54下载
- 积分:1
-
这个程序软件很不错很不错的,内容全面,值得大家去关注下载,研究...
这个程序软件很不错很不错的,内容全面,值得大家去关注下载,研究-good
- 2022-02-01 06:40:17下载
- 积分:1
-
Conditions increased the sum of functions, according to the conditions not to jo...
增加了条件求和功能,可按条件筛选不加入求和的记录-Conditions increased the sum of functions, according to the conditions not to join the summation filter record
- 2022-02-07 08:18:44下载
- 积分:1
-
good lecture about designing
good lecture about designing
- 2022-02-05 01:30:19下载
- 积分:1
-
数字签名
数字签名---Delphi Activex-Digital Signature-Delphi Activex
- 2022-02-06 22:43:03下载
- 积分:1