The following is a timer event process I have compiled:
In this process, static variable I must be defined using static. If Dim is used as a dynamic variableProgramThere is no overall error, but the expected results are not met.
Private sub timer1_timer ()
StaticI as integer
If I = 8 then
I = 1
End if
I = I + 1
'Execute imgbrid to move the image frame horizontally to the right.
Imgbrid. Left = imgbrid. Left + 60
If imgbrid. Left> me. scalewidth then
Imgbrid. Left = me. scaleleft-imgbrid. Width
End if
Select case I
Case 1
Imgbrid. Picture = imgbrids (0). Picture
Case 2
Imgbrid. Picture = imgbrids (1). Picture
Case 3
Imgbrid. Picture = imgbrids (2). Picture
Case 4
Imgbrid. Picture = imgbrids (3). Picture
Case 5
Imgbrid. Picture = imgbrids (4). Picture
Case 6
Imgbrid. Picture = imgbrids (5). Picture
Case 7
Imgbrid. Picture = imgbrids (6). Picture
Case 8
Imgbrid. Picture = imgbrids (7). Picture
End select
End sub