delphi7 Cannot assign a TFont to a TFont问题
来源:互联网 发布:深圳中医诊所知乎 编辑:程序博客网 时间:2024/05/22 22:56
头些天需要把 程序写成DLL来给其他人使用!!
在生成以后,调用发现程序提示这个错误 Cannot assign a TFont to a TFont 百思不得其解。
上网找了很多这方面的文章 解决方法大概就以下几类
1.深度赋值(我是没看明白什么)
2.带包编译(菜单Project-options-packages- 把build with runtime packages 勾上 一般带vcl rtl这2个包编译就行):
这个方法是可以解决这个错误!但是需要在 dll和exe程序里都带包编译才行!
3.这个是我憋了3天看了N个别人写的DLL才发现的
就是我在编写dll 的时候 向dll里传递程序变量
procedure GzWageFrm(App:TApplication;src:TScreen;conn: ShortString;idx:Integer); stdcall;
begin
Application:= App;
Screen := Scr; //这个变量引起的!!
end;
但我把他屏蔽掉以后 运行程序时又发现 DLL里的窗体和主程序里的窗体发生冲突!!
后来把DLL改成
procedure GzWageFrm(App:THandle;conn: ShortString;idx:Integer); stdcall;
begin
Application.Handle:= App;
end;
问题解决了!!
希望能给部分朋友提供点帮助!!
- delphi7 Cannot assign a TFont to a TFont问题
- Cannot assign a TFont to a TFont
- Cannot assign a TFont to a TFont!!
- cannot assign a tfont to a tfont
- DLL:cannot assign a tfont to a tfont
- 主程序调用DLL窗体 cannot assign a TFont to a TFont 问题的彻底解决方案
- 主程序调用DLL窗体 cannot assign a TFont to a TFont 问题的彻底解决方案
- DLL中报'Cannot assign a TFont to a TFont'的问题
- 关于Dll中“cannot assign a tfont to a tfont ”问题
- 调用DLL窗体 cannot assign a TFont to a TFont 问题
- Cannot assign a device to node
- 主程序调用DLL窗体cannot assign a class to a class问题的彻底解决方案
- TFont里的字体大小
- TFont 类的常用属性:
- OPCAutomation_TLB.pas(1240): Cannot assign to a read-only property 问题解决
- cannot assign to 'self' outside of a method in the init family
- Cannot assign to 'self' outside of a method in the init family
- 关于error:Cannot assign to 'self' outside of a method in the init family
- OpenGL(glut)如何计算fps
- COALESCE() 函数创新应用
- O3D 学习—如何复制一个Transform的模型
- 数据库分表处理设计思想和实现
- 等价类划分法实例
- delphi7 Cannot assign a TFont to a TFont问题
- 4.2.5 鼠标和键盘
- .net笔记3:关于PowerShell
- O3D 编程起步
- HP P2055d激光打印机PCL XL error的解决
- 老公
- O3D 例2- 立方体的移动、缩放和旋转
- 4.2.6 键盘快捷键
- 点点滴滴,积少成多