正在做vb学单词的程序,需要在text里面滚动显示单词库里面的单词,代码怎么写啊
1个回答
展开全部
'自己理解一下
Option Explicit
Dim arr(1 To 10)
Private Sub Form_Activate()
Dim i, j
For i = 1 To UBound(arr)
For j = 1 To 5
Randomize
arr(i) = arr(i) & Chr(Int(Rnd * 26) + 65)
Next
Next
Print Join(arr, vbNewLine)
Timer1.Interval = 1000
End Sub
Private Sub Timer1_Timer()
Static n As Long
n = n + 1
If n > UBound(arr) Then n = 1
Text1 = arr(n)
End Sub
Option Explicit
Dim arr(1 To 10)
Private Sub Form_Activate()
Dim i, j
For i = 1 To UBound(arr)
For j = 1 To 5
Randomize
arr(i) = arr(i) & Chr(Int(Rnd * 26) + 65)
Next
Next
Print Join(arr, vbNewLine)
Timer1.Interval = 1000
End Sub
Private Sub Timer1_Timer()
Static n As Long
n = n + 1
If n > UBound(arr) Then n = 1
Text1 = arr(n)
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询