本人设计拉一个简单动画显示的例子(其中有image1,image2,image3,image4四个图像框控件,我事先在image1,image2,image3中载入图片,然后通过一个定时器将image1,image2,image3中的图片轮流传递给image4)定时器程序如下:
private sub timer1_timer()
if (flag-3)=0 then
flag=0
else
if flag=0 then
image4.picture=image1.picture
elseif flag=1 then
image4.picture=image2.picture
elseif flag=2 then
image4.picture=image3.picture
end if
flag=flag+1
end if
end sub
这里的flag变量定义为窗体级变量,用来控制三副图片的显示顺序,三次一个循环。
可是当我运行的时候,却始终只能将image1.picture载入image4.picture,不知道是为什么,还请各位指点指点。
private sub timer1_timer()
if (flag-3)=0 then
flag=0
else
if flag=0 then
image4.picture=image1.picture
elseif flag=1 then
image4.picture=image2.picture
elseif flag=2 then
image4.picture=image3.picture
end if
flag=flag+1
end if
end sub
这里的flag变量定义为窗体级变量,用来控制三副图片的显示顺序,三次一个循环。
可是当我运行的时候,却始终只能将image1.picture载入image4.picture,不知道是为什么,还请各位指点指点。
解决方案 »
- 我的msdn为什么代码不全呢
- 求大神帮忙解决下 感激不尽!
- 数据处理中常用的控件有那些?
- vb三层结构的开发
- 在线结账50:a类中能否使用b类的函数?
- 我这儿有一个软件,原来是ACCESS数据库,现在我想改成SQL数据库的不知道怎么从何处下手?请高手指点
- 怎么得到一个文件在光盘上的所在扇区?
- 请问如何获取Windows的语言版本信息?
- VB程序在编译成EXE文件时如何改变EXE文件的图标,可以用GIF或是JPG格式的图片吗?
- 如何用webbrowser打开本地的网页
- 关于用ado和datagrid访问SQL server 数据库的问题,请各位大侠指导并给出一些好方法!!!我的全部家当!!!
- VB控制Excel中的单元格问题(急)
Static flag As Interger
if (flag-3)=0 then
flag=0
else
if flag=0 then
image4.picture=image1.picture
elseif flag=1 then
image4.picture=image2.picture
elseif flag=2 then
image4.picture=image3.picture
end if
flag=flag+1
end if
end sub