登录
首页 » Delphi VCL » 嘿嘿,大侠看到不要见笑呀... 大家都知道使用DLL的好处.于是我就想把FORM封装到DLL里面去. 到网上找,发现是MDI和模式窗体的,非模式的也有...

嘿嘿,大侠看到不要见笑呀... 大家都知道使用DLL的好处.于是我就想把FORM封装到DLL里面去. 到网上找,发现是MDI和模式窗体的,非模式的也有...

于 2022-01-31 发布 文件大小:63.31 kB
0 169
下载积分: 2 下载次数: 1

代码说明:

嘿嘿,大侠看到不要见笑呀... 大家都知道使用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 运行...成功,

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • with delphi addendum to the very precise timing, accuracy can be less than us.
    用delphi编的,很精确的定时,精确度可以少于us.-with delphi addendum to the very precise timing, accuracy can be less than us.
    2022-01-25 20:53:58下载
    积分:1
  • 将fastreport2系列frf文件自动生成form,每一页在gen目录下自动生成一页...
    将fastreport2系列frf文件自动生成form,每一页在gen目录下自动生成一页-Frf file fastreport2 series will be automatically generated form, each page in gen directory automatically generated page
    2022-08-08 00:17:54下载
    积分:1
  • 功能和DELPHI的窗体设计器相同的控件,可让你的程序在运行时设计窗体。  解压后有个FormDesigner.bpl,将它add到component中,编...
    功能和DELPHI的窗体设计器相同的控件,可让你的程序在运行时设计窗体。  解压后有个FormDesigner.bpl,将它add到component中,编译的时候,请将lib路径加上解压的目录。 或者将DesignCommon.dcu、FormDesigner.dcu、ObjectInsp.dcu、WsPopupList.dcu、ObjectInsp.dfm、WsPopupList.dfm拷贝到你的工程文件的同一个文件夹中。不过把FormDesigner.bpl add到component中是需要的。-function and form design for the same control that will allow you to the procedures in operation at design forms. After extracting FormDesigner.bpl months, it will add to the component, compile time, I would be grateful if lib with decompression path to the directory. Or will DesignCommon.dcu, FormDesigner.dcu, ObjectInsp.dcu, WsPopupList.dcu, ObjectInsp.dfm, WsPopupList.dfm copy of your project documentation with a folder. But put FormDesigner.bpl add to the component is needed.
    2023-01-27 20:05:04下载
    积分:1
  • DELPHI 高效线程池代码 DELPHI 高效线程池代码
    DELPHI 高效线程池代码 DELPHI 高效线程池代码-DELPHI efficient thread pool thread pool code and efficient code for DELPHI
    2022-08-05 13:41:54下载
    积分:1
  • This system is mainly divided into 11 sub
    本系统主要划分为11个子模块:与操作员有关的文献刊物入库、出库、库结存和文献刊物查询,修改密码,注销,帮助等模块;与计算机管理员有关的在此基础上添加了报表打印,操作员管理,文献刊物编号管理,文献刊物出版社管理等。-This system is mainly divided into 11 sub-modules: with the operators of storage-related literature publications, a library, bank balances and documentation Publications query, modify your password, write-off to help, such as module and computer-related administrators on the basis of added Statement printing, operator management, literature publication number management, literature publishing house publications management.
    2022-02-04 23:57:19下载
    积分:1
  • Delphi2005 B/S程序设计技巧集(4
    Delphi2005 B/S程序设计技巧集(4-11) 现在delphi 2005 B/S的书籍资料太少,几乎没有可参考的资料,这在一定程度上限制了delphi 2005的使用,相反C#,ASP的书籍资料到处都是。通过几个月的学习也算是总结了一点经验,从现在起我将陆续将ASP和C#的例子、技巧翻译到delphi 2005下面,希望对大家的学习和工作有帮助,毕竟.Net是一种发展趋势。我将不定期写新的内容,同时,如果你在工作或学习中有什么问题,我也会将问题加入本篇文章,另外,一个人的能力毕竟有限,也希望大家共同来解决问题。 宋雨炫 -Delphi B/S programming skills sets (4-11) now delphi 20 05 B/S books so little information, almost no reference to the information, This, to a certain extent, limit the use of Delphi 2005, C# contrary, ASP information books are everywhere. Through several months of learning is also summed up the experiences that from now on I will continue, ASP and C# example, delphi translation skills to below 2,005, we hope to study and work there to help, After all. Net is a development trend. From time to time I will write the new content, and if you work or study any problem, I will also take the issue into this article, in addition to the ability of a person is limited, I hope we can jointly to solve the problem. SONG Xuan
    2022-05-14 20:21:00下载
    积分:1
  • 一个用delphi实现json应用的开发包。最新版本。包含源码。
    一个用delphi实现json应用的开发包。最新版本。包含源码。-A package which use delphi to implement Json application.Include full source.
    2022-04-27 21:15:52下载
    积分:1
  • 别人做的,不是我自己做的,做的人是个高手。
    别人做的,不是我自己做的,做的人是个高手。-Someone else to do, not my own, and those who do is a master.
    2022-03-12 12:23:00下载
    积分:1
  • 服务器目录索引工具源代码
    服务器目录索引工具源代码-tools directory server source code
    2022-02-22 09:04:04下载
    积分:1
  • 该系统使用Delphi7作为开发语言,该软件是一个面向对象的开发程序,是开发数据库前端的优秀工具, 采用Delphi来开发数据库应用程序具有更大的灵活性和可扩展...
    该系统使用Delphi7作为开发语言,该软件是一个面向对象的开发程序,是开发数据库前端的优秀工具, 采用Delphi来开发数据库应用程序具有更大的灵活性和可扩展性。数据库通过ADO技术来与应用程序进行连接,其主要优点是易于使用、高速度、低内存支出和占用磁盘空间较少。同时本系统主要以班级管理为主,再配以课程管理、学籍管理,是商丘四中学生管理必不可缺的好帮手。本系统的开发和应用,可以极大的提高商丘四中的学生管理水平,学校的办公效率也可以有很大的提高,化简了繁琐的工作模式,从而使学校的管理更加合理化和科学化。良好的信息系统节省了大量的人力和物力,也避免了大量重复性的工作。-err
    2022-07-12 02:55:11下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载