VB怎么清除text指定内容?
我设置了两个计时器,计时器1每隔两秒生成一个字符串,然后每个生成的字符串隔七秒就会消失,请问这要如何实现?用何种语句?...
我设置了两个计时器,计时器1每隔两秒生成一个字符串,然后每个生成的字符串隔七秒就会消失,请问这要如何实现?用何种语句?
展开
展开全部
Option Explicit
Dim a(1 To 4) As String, t As Integer
Private Sub Form_Load()
Dim i As Integer
For i = 1 To 3
a(i) = ""
Next i
Timer1.Interval = 2000
Timer3.Interval = 1000
t = -2
End Sub
Private Sub Timer1_Timer()
If t <= 6 Then
Dim i As Integer
For i = 1 To 3
a(i) = a(i + 1)
Next i
End If
a(4) = t
Text1.Text = a(1) & a(2) & a(3) & a(4)
End Sub
Private Sub Timer2_Timer()
Dim i As Integer
For i = 1 To 3
a(i) = a(i + 1)
Next i
a(4) = ""
Text1.Text = a(1) & a(2) & a(3) & a(4)
End Sub
Private Sub Timer3_Timer()
t = t + 1
If t = 5 Then
Timer2.Interval = 2000
End If
只是给个思路,具体的靠自己吧
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询