-
嘿嘿,大侠看到不要见笑呀...
大家都知道使用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
-
井字棋的delphi源码,没有使用控件,适用用任何delphi版本,智能超强,不需搜索,优秀的估值函数一步即得最优解,无人可以下过电脑
井字棋的delphi源码,没有使用控件,适用用任何delphi版本,智能超强,不需搜索,优秀的估值函数一步即得最优解,无人可以下过电脑-Tic-tac-toe game delphi source, do not use the controls, the application of any delphi version, smart super, no english, excellent step in the valuation function that was the optimal solution, no one can have the computer under
- 2022-01-30 19:32:34下载
- 积分:1
-
delphi的ipx协议构件,充分发挥ipx无验证速度快的特点
delphi的ipx协议构件,充分发挥ipx无验证速度快的特点-delphi the ipx agreement components, and give full play to ipx no authentication features fast
- 2022-05-18 23:06:35下载
- 积分:1
-
Delphi技巧108例
对初学者很有帮助
Delphi技巧108例
对初学者很有帮助-Delphi technique 108 cases helpful for beginners
- 2022-02-13 07:11:18下载
- 积分:1
-
这是一个关于MyDAC数据组件的简单实例。
这是一个关于MyDAC数据组件的简单实例。-This is a matter MyDAC a simple example of data components.
- 2022-01-25 16:44:47下载
- 积分:1
-
实现加减乘除的简单计算器,可以将0显示在输入的右面.
实现加减乘除的简单计算器,可以将0显示在输入的右面.-realize the simple arithmetic calculators, can be shown in the importation of 0 to the right.
- 2022-01-23 11:03:21下载
- 积分:1
-
delphi读取数据从资源文件的源代码的源水库只允许工业。
DELPHI从资源文件RES读出数据源码源码。只允许个人学习研究-DELPHI read data from the resource file source code source RES. Allowed only individual study and research
- 2023-06-11 01:55:03下载
- 积分:1
-
显示磁盘容量大的驱动器在
show disk capacity for large drive in delphi
- 2022-03-19 09:31:06下载
- 积分:1
-
这个软件是用Delphi 7开发的。
原本它是两个人在纸面上玩的益智游戏,转移到电脑上后我给它添加了人机对奕和网络对战的功能。
在本源码中你
这个软件是用Delphi 7开发的。
原本它是两个人在纸面上玩的益智游戏,转移到电脑上后我给它添加了人机对奕和网络对战的功能。
在本源码中你可以看到电脑AI实现方法,ClientSocket,ServerSocket的使用,控件的编写,ListBox的OwnerDraw的实现等等技巧。
请先安装里面的GridPanel控件才可正常编译。
永远支持Delphi! -The software is developed with Delphi 7. Originally it was two people playing on paper puzzle game, transfer to your computer to it after I added a human-computer war games and network functions. In this source you can see the computer AI method, ClientSocket, ServerSocket use, control of the preparation, ListBox, etc. The realization of OwnerDraw skills. Please install inside GridPanel normal controls in order to compile. Forever in support of Delphi!
- 2022-04-12 07:34:42下载
- 积分:1
-
非常棒的一组控件
非常棒的一组控件-wonderful a group of controls
- 2022-02-03 05:01:43下载
- 积分:1