加个定时器就ok了: Option Explicit Dim filename() As String Dim i As Long Private Sub Form_Load() ReDim filename(3) filename(0) = "c:\1.bmp" filename(1) = "c:\2.bmp" filename(2) = "c:\3.bmp" filename(3) = "c:\4.bmp" Timer1.Interval = 100 Timer1.Enabled = True i = 0 End SubPrivate Sub Timer1_Timer() If i > 3 Then Shell "notepad.exe", 1 End Else Set Me.Picture = LoadPicture(filename(i)) i = i + 1 End If End Sub
建一个窗体,在窗体上加上有五个图片框的控件数组,装入你想要的图片,所有的图片框设置为不可见。再加一个timer控件。运行后,可用timer控件控制图片切换:Private Sub Timer1_Timer() static i as integer i=i+1 if i=5 then timer1.enabled=false shell(别人的软件) unload me end if me.Picture=picture1(i).picture End Sub
Option Explicit
Dim filename() As String
Dim i As Long
Private Sub Form_Load()
ReDim filename(3)
filename(0) = "c:\1.bmp"
filename(1) = "c:\2.bmp"
filename(2) = "c:\3.bmp"
filename(3) = "c:\4.bmp"
Timer1.Interval = 100
Timer1.Enabled = True
i = 0
End SubPrivate Sub Timer1_Timer()
If i > 3 Then
Shell "notepad.exe", 1
End
Else
Set Me.Picture = LoadPicture(filename(i))
i = i + 1
End If
End Sub
static i as integer
i=i+1
if i=5 then
timer1.enabled=false
shell(别人的软件)
unload me
end if
me.Picture=picture1(i).picture
End Sub
rainstormmaster(暴风雨 v2.0) 的方便快捷!
victorycyz(中海) 也ok
i这时候相当于模块级变量
和 rainstormmaster(暴风雨 v2.0) 那个i是一样的
在这一个细节上,我认为rainstormmaster的处理不好,可移植性要差一点。
所以问了那个问题,看来这个细节还真是有它的用处的