-
嘿嘿,大侠看到不要见笑呀...
大家都知道使用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
-
收发MAPI E
收发MAPI E-Mail(非SMTP E-mail), 传真的构件-TX MAPI E-Mail (SMTP E-mail), fax Component
- 2023-08-29 14:35:03下载
- 积分:1
-
Delphi Driver Development Kit 有了它以后可以用delphi开发驱动程序了。里面有详尽的例子。...
Delphi Driver Development Kit 有了它以后可以用delphi开发驱动程序了。里面有详尽的例子。-Delphi Driver Development Kit With it can be used after the de lphi development of the driver. There are detailed examples.
- 2022-01-26 00:38:04下载
- 积分:1
-
用一个循环检查局域网段的每一个IP,并向它们的指定端口发包(如5150),在指定时间间隔内返回的包,说明它是存活的,则加如到服务器的队伍。(可以多发几次,来保证...
用一个循环检查局域网段的每一个IP,并向它们的指定端口发包(如5150),在指定时间间隔内返回的包,说明它是存活的,则加如到服务器的队伍。(可以多发几次,来保证准确性,用UDP 实行)-With a cycle check every paragraph LAN IP, and their contract specified port (eg 5150), at the designated time interval to return the package, that it is to survive, then add to the server, such as team. (Can be multiple times to ensure accuracy, implemented using UDP)
- 2023-08-14 06:35:03下载
- 积分:1
-
Delphi 使用 Mirro driver 编写的屏幕截屏
Delphi 使用 Mirro driver 编写的屏幕截屏-Delphi used to prepare the screen Mirro driver Screenshots
- 2023-05-15 08:10:03下载
- 积分:1
-
TMS Component Pack v3.3 Datecode 20041030 *RETAIL
TMS Component Pack v3.3 Datecode 20041030 *RETAIL-TMS Component Pack v3.3 Datecode 20041030*RETAIL
- 2022-06-15 16:49:23下载
- 积分:1
-
基于Internet的利用IIS实现系统的自动更新程序
基于Internet的利用IIS实现系统的自动更新程序-Based on Internet use IIS realize the system automatically updates
- 2022-04-25 17:21:46下载
- 积分:1
-
Communicate with SMS (Short Message Services) for delphi
用于delphi开发受机短信处理-Communicate with SMS (Short Message Services) for delphi
- 2022-02-15 04:18:18下载
- 积分:1
-
GprsSDK的开发源代码,DELPHI写的
GprsSDK的开发源代码,DELPHI写的-GprsSDK the development of source code, DELPHI written
- 2022-06-19 22:39:39下载
- 积分:1
-
利用delphi跟西门子s5系列PLC通讯,完成数据采集
利用delphi跟西门子s5系列PLC通讯,完成数据采集-Use delphi with Siemens s5 series PLC communication, the completion of data acquisition
- 2023-08-10 11:15:03下载
- 积分:1