请教高手 用timer依次读出数组中的元素
请问如何用timer依次读出数组中的元素,最好能给出小程序示例,多谢多谢
2010-12-04 21:23
2010-12-05 00:05
2010-12-05 16:10
程序代码:Option Base 1
Dim N, Ar(6) As Integer
Private Sub Form_Load()
Text1.Text = ""
Timer1.Interval = 1000
Timer1.Enabled = False
Dim i As Integer
For i = 1 To 6
Ar(i) = i
Next
N = 1
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
Text1.Text = Text1.Text & Ar(N) & " "
N = N + 1
If (N > 6) Then
Timer1.Enabled = False
End If
End Sub
是不是你想达到的效果?
2010-12-05 17:11

2010-12-05 17:13

2010-12-05 17:14
2010-12-05 17:31
2010-12-05 20:00
2010-12-05 20:01

2010-12-05 20:01