想請問vb6
想請問如何用timer設定播放圖片或影片
之前 我用迴圈寫 但是 跟同學的程式碼組合起來後會相碰
想請問一下 我該怎麼改成用timer的
以下是我用迴圈寫的
Private Sub Command1_Click()
Dim pic(100), listfile As String
Dim n, i, timeintvl As Single
pictime = 0.5
Open App.Path + "\圖檔\清單.txt" For Input As #1
Do While Not EOF(1)
i = i + 1
Input #1, pic(i)
Loop
Close (1)
timeintvl = pictime * 60 / (i - 1)
n = 0
Do Until n = i
n = n + 1
Picture1.Picture = LoadPicture(App.Path + "\圖檔\" & pic(n) & ".jpg")
Call wait(timeintvl)
Loop
End Sub
此帖於 2009-05-29 09:33 PM 被 tpopmac01 編輯.
|