急:用Delphi语言怎么实现图片的自动播放??

来源:百度知道 编辑:UC知道 时间:2024/05/28 05:34:16
Delphi7.0。数据库是Access。请各位高手赐教,有代码最好。谢谢啦~!!

如果你把图片作为大字段存入数据库:
1 界面上放一个dbimage控件,对应表中图片字段.
2 在定时器中控制表记录循环,代码如下:
if table1.eof then
table1.first;

if not table1.eof then
table1.next;

如果你把图片路径存入数据库,图片还在硬盘上某个位置,那么:
1 界面上放一个image控件
2 在定时器中控制表记录循环,同时改变图片的路径属性。代码如下:
if table1.eof then
table1.first;

if not table1.eof then
begin
image1.picture.loadfromfile(table1.fieldbyname('picdir').asstring);
table1.next;
end;