delphi xe TBitmap支持Gif,成为具有jpg,gif,bmp,ico,gif五种显示功能的图片控件


本文整理自网络,侵删。

 让TBitmap支持Gif,成为具有jpg,gif,bmp,ico,gif五种显示功能的图片控件

TImage要支持Gif,代码,我查的xe5的新增功能,亲自调试无错误,特来分享!

var

      stream: TResourceStream;

      tbimap: TBitmap;

begin

BitmapListAnimation1.AnimationBitmap.LoadFromFile('本地图片地址');

      BitmapListAnimation1.AnimationCount := 4; 

      BitmapListAnimation1.AnimationRowCount := 1;

      //BitmapListAnimation1.PropertyName := 'TEST';

      BitmapListAnimation1.AnimationBitmap.CopyFromBitmap(tbimap);

      BitmapListAnimation1.Enabled := true;

      BitmapListAnimation1.Start();

      image1.Bitmap := tbimap;

end;

 

这样就成为:TBitmap支持Gif,成为具有jpg,gif,bmp,ico,gif五种显示功能的图片控件了!

相关阅读 >>

Delphi制作移动文字、图片

Delphi实例键盘记录

Delphi trayicon1 托盘气泡提示

winapi 字符及字符串函数(12): lstrlen - 串长度

Delphi 使用资源文件

Delphi将图片转换成base64编码函数

Delphi指针

Delphi dll 字符串传递例子

Delphi xe5中移动平台的字符串要注意的事项

Delphi winapi: getwindowtextlength - 获取窗口标题长度

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



打赏

取消

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

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

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

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

评论

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