Delphi 判断TImage是否为空及注意事项


本文整理自网络,侵删。

 Delphi 判断TImage是否为空:
1)非空 Image1.Picture.Graphic <> nil
2)为空 Image1.Picture.Graphic = nil
注意不能用Image1.Picture 来判断。

Image1.Picture.Graphic即可直接赋值也可用Assign。
Image1.Picture不能直接赋值,只能用Assign。

Image1.Picture.Graphic  可包含多种格式的图像。
Image1.Picture.Bitmap仅包含Bitmap图像。

相关阅读 >>

Delphi 10 seattle的android应用程序中使用参数启动服务

如何在Delphi中禁用关于“返回值...可能未定义”的警告?

Delphi idhttp post

Delphi 主程序与dll之间的全局变量问题

Delphi 提高unigui开发效率的两个方法

Delphi synedit的安装和基本使用

Delphi url编码与解码工具附代码

Delphi fastreport快速安装教程

Delphi应用synedit完美实现sql语法高亮

Delphi 提高unigui开发效率的两个方法

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...