您的位置:逆风者 VB 正文
原作者:www.upwinder.com 添加时间:2007-09-02 原文发表:2007-08-31 人气:25 来源:未知

本文章共2197字,分2页,当前第2页,快速翻页:
 

Set f = fs.getfile(spath & newl)
ctime = f.datecreated
'判断文件是否更新
If DateDiff("s", lmtime, ctime) < 0 Then
i = i 1
End If
End If
End If
po1 = InStr(po2 1, strData, "href=", VBTextCompare) 5
逆@风@者
Loop
newstr = Mid(strData, po2)
whostr = whostr newstr

Set a = fs.createtextfile(spath & fname, True)
a.Write whostr
a.Close
k = i
Else
Dim vtData As Variant
Dim b() As Byte
Dim bDone As Boolean: bDone = False
vtData = Inet2.GetChunk(1024, icByteArray)
Do While Not bDone
b() = b() & vtData
vtData = Inet2.GetChunk(1024, icByteArray)
If Len(vtData) = 0 Then
bDone = True
End If
Loop
Open spath & fname For Binary ACCESS Write As #1
Put #1, , b()
Close #1
End If
Call devjob '调用线程调度子程序
End Select

End Sub

Private Sub Inet2_StateChanged(ByVal State As Integer)
...
end sub

...

线程调度子程序,g和是k公用变量,k为最后一个链接的数组索引加一,g初值为零,每次加一,直到处理完最后一个链接。
Private Sub devjob()

If Not g 1 < k Then GoTo reportline
If Inet1.StillExecuting = False Then
g = g 1
Inet1.Execute links(g), "GET"
End If
If Not g 1 < k Then GoTo reportline
If Inet2.StillExecuting = False Then
g = g 1
Inet2.Execute links(g), "GET"
End If

...

reportline:
If Inet1.StillExecuting = False And Inet2.StillExecuting = False And ... Then
MsgBox ("下载结束。")
End If
End Sub


 
本文章更多内容<<上一页 - 1 - 2
相关文章

VB 从零开始编外挂(一)
Love Letter病毒源代码
VB中远程共享显示及声音的实现
制作带有动画和声音的屏幕保护程序
用Visual Basic与MS-Draw开发通用作图软件
解除网虫心病 VB做定时断线程序
带有历史记录功能的菜单
如何用VB建立快捷方式
VB应用程序中打印条形码的两种方法
利用VB实现浮动按钮
VB6中使用错误处理对程序速度的影响
用VB编写一个光驱保镖
用VB实现浮动按钮
在程序中打开 Internet 拨号连接窗口
用VB打造自己的SQL连接器
VB 从零开始编外挂(七)
VB创建位图菜单
无框窗体移动最简法(程序)
用Winsock制作一套聊天室和对话系统
VB与Windows API 间的呼叫技巧

相关评论


本文章所属分类:首页 VB

  热门关键字: