Delphi 安卓添加资源图片并读取


本文整理自网络,侵删。

 
通过 Deployment Manager 添加图片 CHEMICAL.png 和 FACTORY.png
uses System.IOUtils;

procedure TForm1.FormCreate(Sender: TObject);
var
  Path: string;
begin
  Path := TPath.Combine(TPath.GetDocumentsPath, 'CHEMICAL.png');
  if TFile.Exists(Path) then
    Image1.Bitmap.LoadFromFile(Path);
  Path := TPath.Combine(TPath.GetDocumentsPath, 'FACTORY.png');
  if TFile.Exists(Path) then
    Image2.Bitmap.LoadFromFile(Path);
end;


相关阅读 >>

Delphi 存储文件到数据库

Delphi程序中使用自定义的鼠标

Delphi分割字符串的函数--extractstrings

Delphi rest application 与 webbroker application 区别

Delphi tbitmap创建时提示object or class type required

Delphi 如何产生输出一个变形的图形及文字

Delphi xe android platform uses-permission[2] androidmanifest.xml 配置

Delphi dbgrid 表格自适应宽度

Delphi 自我复制源码

Delphi遍历指定目录下指定类型文件的函数

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



打赏

取消

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

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

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

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

评论

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