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

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

于 2022-01-31 发布 文件大小:63.31 kB
0 151
下载积分: 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 个回复

  • delphi开发的电力调度操作票系统并带有access数据库
    用delphi开发的电力调度操作票系统并带有access数据库-Delphi development of the electricity used to operate ticket system scheduling with access database
    2022-07-13 08:23:07下载
    积分:1
  • Delphi run
    Delphi运行时设计,完全开源,包括Demo,RttiDesign.pas文件用于控制单元。
    2022-03-03 04:15:56下载
    积分:1
  • Delphi 绘图 贝赛尔曲线
    Delphi 绘图 贝赛尔曲线-delphi draw
    2022-06-01 08:52:31下载
    积分:1
  • toi co the nghe nhac bang choung trinh nay
    toi co the nghe nhac bang choung trinh nay
    2023-02-04 01:25:04下载
    积分:1
  • 4.4建立4.4.48 ehlib来源包括版本。
    EhLib 4.4 Build 4.4.48 source included version.
    2022-04-18 09:29:02下载
    积分:1
  • Delphi中的DLL封装和调用对象技术,学写dll编写最简单的例子。...
    Delphi中的DLL封装和调用对象技术,学写dll编写最简单的例子。-Delphi in the package and call the DLL object technology, learn to prepare to write the most simple dll example.
    2022-03-01 07:58:04下载
    积分:1
  • 转载于网络数据库程序的远程操作。希望能帮助你!
    网络上转载的一个远程操作数据库程序.希望对大家有帮助!-Reproduced in a network database program remote operations. Want to help you!
    2023-05-06 22:25:03下载
    积分:1
  • 动态红绿灯控件,可变化红率黄颜色。用于网络或串口通讯的数据收发指示,是极好的编程控件。...
    动态红绿灯控件,可变化红率黄颜色。用于网络或串口通讯的数据收发指示,是极好的编程控件。
    2022-05-12 15:51:40下载
    积分:1
  • Memory management procedures, functions and FASTMM similar, PLEASE NOTE: There a...
    内存管理程序,功能与FASTMM相似,PLEASE NOTE: There are two ways to install BigBrain. You may use the memory manager code natively compiled into your EXE or you can use an included external DLL which will allow you to share memory across multiple DLLs with one central place for memory management. Using the DLL allows your application to share strings, and serves the same purpose as the ShareMem unit included with Delphi. BigBrainShareMem.dll should be 100% compatible with the DelphiMM.dll and could even simply be renamed to DelphiMM.dll to simplify deployment.-Memory management procedures, functions and FASTMM similar, PLEASE NOTE: There are two ways to install BigBrain. You may use the memory manager code natively compiled into your EXE or you can use an included external DLL which will allow you to share memory acrossmultiple DLLs with one central place for memory management. Using the DLLallows your application to share strings, and serves the same purposeas the ShareMem unit inc
    2022-10-25 22:25:02下载
    积分:1
  • beam transport management training) videos in four buttons. [Conferencing_Vidio_...
    运输培训管理束)录像等四个按钮。 [Conferencing_Vidio_system.rar] - 用微软实时通信(RTC)API创建音频和视频会议、共享应用程序、共享白板、简单的点对点聊天对话以及整合的音频和视频调节向导的接口。 [UVC.rar] - USB video class(UVC)用与视频聊天开发-beam transport management training) videos in four buttons. [Conferencing_Vidio_system.rar]- Using Microsoft real-time communications ( RTC) API to create audio and video conferencing, application sharing, whiteboard sharing. simple peer-to-peer chat dialogue and the integration of audio and video adjustment wizard interface. [UVC.rar]- USB video class (UVC) with the development and Video Chat
    2022-12-04 16:25:03下载
    积分:1
  • 696516资源总数
  • 106409会员总数
  • 8今日下载