✔ 最佳答案
寫D pseudo-code比你參考下啦
無寫VB幾十世,希望D syntax唔會錯得太離譜啦~~
----------------------------------------------------
Components needed:
Timer 'Change the image in ImgPic in the required interval
- Name: tmrChangePic
- Interval: 1000 'Default 1 sec per tick
- Enabled = true
RadioButton(3) 'Control the interval of tmrChangePic
- Name: radTime(3)
- radTime(0) represents 1 sec, radTime(1) represents 2 sec, radTime(2) represents 3 sec
ImageList 'Contains those 8 images
- Name: ImgLst
Image 'Image box that shows the image
- Name: ImgPic
----------------------------------------------------
Pseudo-Code:
Option Explicit
Dim i As Integer
Private Sub Form_Load()
i = 0
End Sub
Private Sub tmrChangePic()
If i < 7 Then
i = i + 1
Else
i = 0
End if
ImgPic.Picture = ImgLst.Images(i)
End Sub
Private Sub radTime_Change(Index As Integer)
tmrChangePic.inteval = (Index+1)*1000
End Sub
----------------------------------------------------