找回密码
 立即注册→加入我们

QQ登录

只需一步,快速开始

搜索
热搜: 下载 VB C 实现 编写
查看: 1182|回复: 3

逍遥下载组件控件OCX,DLL(单个下载,批量下载)适用VBA,VB6,易语言

[复制链接]
发表于 2025-7-27 14:10:49 | 显示全部楼层 |阅读模式

欢迎访问技术宅的结界,请注册或者登录吧。

您需要 登录 才可以下载或查看,没有账号?立即注册→加入我们

×
功能:下载组件,单个下载,批量下载,OCX,DLL模式
适合32位VB6,VBA,64位的正在开发中
使用教程视频网址:https://www.bilibili.com/video/BV1p98xzTEeq/
03批量下载10个,速率10M每秒左右,全宽带占用.png
  1. Option Explicit
  2. 'Dim DownListA As New HttpDownList
  3. Dim WithEvents DownListA As HttpDownList '批量下载
  4. Dim WithEvents Down As HttpDown

  5. Private Sub Command1_Click()
  6.     '批量下载
  7.     Set DownListA = New HttpDownList
  8.     Dim UrlList(1) As String, CustomFileNameArrA(1) As String
  9.     UrlList(0) = "https://raw.staticdn.net/xiaoyaocode163/Webview2_win7_109List/main/Webview2Sdk.zip"
  10.     UrlList(1) = "https://raw.staticdn.net/xiaoyaocode163/Webview2_win7_109List/main/Webview2Sdk.z01"
  11.     CustomFileNameArrA(0) = "1.ZIP"
  12.     CustomFileNameArrA(1) = "2.ZIP"
  13.     DownListA.StartDownList UrlList, "", True, CustomFileNameArrA
  14. End Sub

  15. Private Sub Command2_Click()
  16.     '单个下载
  17.     Set Down = New HttpDown
  18.     Down.StartDown "https://raw.staticdn.net/xiaoyaocode163/Webview2_win7_109List/main/Webview2Sdk.zip", App.Path & "\test.zip"
  19. End Sub

  20. Private Sub Command3_Click()
  21.     '控件下载
  22.      DownOCX1.DownLoad "https://raw.staticdn.net/xiaoyaocode163/Webview2_win7_109List/main/Webview2Sdk.zip", App.Path & "\test.zip", "test.zip"
  23. End Sub

  24. Private Sub Command4_Click()
  25.       Set DownListA = New HttpDownList
  26.     DownListA.ShowDownForm '调用下载工具/显示窗口
  27. End Sub

  28. Private Sub Down_DownloadEnd(ByVal SuccessA As Boolean, ByVal Status As String)
  29.     MsgBox "单次下载完成"
  30. End Sub

  31. Private Sub Down_DownloadProgress(ByVal ReceivedBytes As Long, ByVal TotalBytes As Long)
  32. '下载进度(已收到字节数,总字节数)
  33. End Sub

  34. Private Sub DownListA_AllDownOK()
  35.     MsgBox "DownList_AllDownOK"
  36. End Sub

  37. Private Sub DownListA_DownOK(ByVal Index As Long, ByVal DownCount As Long, ByVal AllCount As Long)
  38.     Debug.Print Index; "完成下载数:" & DownCount; "任务数:" & AllCount
  39. End Sub

  40. Private Sub DownOCX1_DownloadEnd(ByVal SuccessA As Boolean, ByVal Status As String)
  41.     MsgBox "下载完成"
  42. End Sub


  43. Private Sub DownOCX1_接收事件(ByVal 收到字节数 As Long, ByVal 总长度 As Long)
  44. '
  45. End Sub
复制代码

逍遥批量下载组件V2.zip

38.54 KB, 下载次数: 7

回复

使用道具 举报

发表于 2025-7-27 19:56:34 | 显示全部楼层
在RING3下载东西不费事啊。。。URLDownloadToFile不就行了?
回复 赞! 靠!

使用道具 举报

 楼主| 发表于 2025-7-28 05:47:50 | 显示全部楼层
美俪女神 发表于 2025-7-27 19:56
在RING3下载东西不费事啊。。。URLDownloadToFile不就行了?

URLDownloadToFile,控件本身的异步下载都用不了,就是这么怪。
回复 赞! 靠!

使用道具 举报

发表于 2025-8-19 22:17:26 | 显示全部楼层
URLDownloadToFile 如遇到网络问题,会卡死
回复 赞! 靠!

使用道具 举报

本版积分规则

QQ|Archiver|小黑屋|技术宅的结界 ( 滇ICP备16008837号 )|网站地图

GMT+8, 2026-3-10 06:01 , Processed in 0.037289 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表