Home > Software engineering >  How to download a file?
How to download a file?

Time:09-16

how to download a file and displays a progress
Website has one or more instruments like 3
Click on the download program synchronous download 1. EXE, 2. EXE, 3. EXE and display the download progress

CodePudding user response:

 Private Sub DownNetFile (ByVal nUrl As String, ByVal nFile As String) 
Dim XmlHttp, (b) As Byte
The Set XmlHttp=CreateObject (" Microsoft. XmlHttp ")
XmlHttp. Open "GET", nUrl, False
XmlHttp. Send
If XmlHttp. ReadyState=4 Then
(b)=XmlHttp. ResponseBody
Open the nFile For Binary As # 1
Put # 1, and (b)
Close # 1
End the If
The Set XmlHttp=Nothing
End Sub

The Sub can't solve the problem of show the download progress,

CodePudding user response:

Shown to download progress, with inet control block download, download a, update progress
Download the bytes/content 100% - the size of the length report *

CodePudding user response:

You can refer to this post:
https://bbs.csdn.net/topics/396087663
  • Related