Havn't been able to find code anywhere that shows how to monitor the number of bytes downloaded for the WinInet control (Internet Transfer Control), How can I add a progress bar to my App. to show the Download Progress??? HELP!!!
Printable View
Havn't been able to find code anywhere that shows how to monitor the number of bytes downloaded for the WinInet control (Internet Transfer Control), How can I add a progress bar to my App. to show the Download Progress??? HELP!!!
You probably won't find anything here as well. The MSInet Control was made for transferring files, but there is no way to tell how much of the file has been transfered. If you use Winsock, I believe you can do this.
The only thing that you could do is place a StatusBar and change the SimpleText of if to "Connecting...", "Uploading..." and so on.
If you really want a status bar that informs on the # of bytes transfered then i would suggest using an other control (winsock).Code:StatusBar1.SimpleText = "Blah"
'upload
StatusBar1.SimpleText = "Done"
Gl,
D!m
Try this:
Public Sub FtpGetFile()
Inet1.Execute , "GET Test.exe " & App.Path & "\Test.exe"
FileTransfer
End Sub
Public Sub FileTransfer()
'ProgressBar1.Max = 35000
ProgressBar1.Value = 0.05
Do While Inet1.StillExecuting
If ProgressBar1.Value < ProgressBar1.Max - 1 Then
ProgressBar1.Value = ProgressBar1.Value + 0.05
End If
DoEvents
Loop
ProgressBar1.Value = ProgressBar1.Max
End Sub
- Dj4