While Not EOF(1) Input #1, T I = InStr(1, T, "GET") + 5 i1 = InStr(I, T, " Mozilla/5.0+(compatible;+Baidu") If I > 0 And i1 > 0 Then For i2 = 0 To List1.ListCount - 1 If List1.List(i2) = Mid(T, I, i1 - I) Then List1.RemoveItem i2
Next List1.AddItem Mid(T, I, i1 - I) End IfWend
ProgressBar1.Max = List1.ListCount - 1For I = 0 To List1.ListCount - 1
ProgressBar1.Value = I
DoEvents
ProgressBar1.Value = I
Next
现在地区文本的内容 会卡一会一下子全部显示出来 ,我想让他读一条显示一条
Next List1.AddItem Mid(T, I, i1 - I) End IfWend
ProgressBar1.Max = List1.ListCount - 1For I = 0 To List1.ListCount - 1
ProgressBar1.Value = I
DoEvents
ProgressBar1.Value = I
Next
现在地区文本的内容 会卡一会一下子全部显示出来 ,我想让他读一条显示一条
然后用Timer控件,以一定的周期“更新”显示就行了。
List1.AddItem t
List1.ListIndex = List1.ListCount - 1
List1.ListIndex = List1.ListCount - 1
Doevents
一个窗体,一个按钮,一个textbox 一个timer,粘贴下面的代码,运行戳按钮看效果。
Option Explicit
Dim strTest() As StringPrivate Sub Command1_Click()
ReDim strTest(10)
Dim i As Integer
For i = 1 To 10
strTest(i) = "这是第" & i & "个字符串"
Next
Timer1.Interval = 20
Timer1.Enabled = True
End SubPrivate Sub Timer1_Timer()
Static deg As Double
Static strPoint As Long
Dim intLight As Integer
intLight = Fix(255 * (Cos(deg / 180 * 3.1415926) + 1) / 2)
Text1.ForeColor = RGB(intLight, intLight, intLight)
DoEvents
If deg Mod 360 = 0 Then
strPoint = strPoint + 1
If strPoint > UBound(strTest) Then
Timer1.Enabled = False
Text1.Text = "完毕"
Text1.ForeColor = vbBlack
Exit Sub
Else
Text1.Text = strTest(strPoint)
End If
End If
deg = deg + 3
End Sub