Board index » Visual Studio » Downloading from the Net w/ progression bar?
|
sh059
|
Downloading from the Net w/ progression bar?
Visual Studio166
Hello I'd like to add WinVNC to our apps so that users only have to click on a Support button for WinVNC to connect to a support host on our network, and have us help them over the Net. The problem I'm having is that, in case winvnc.exe is not already in their application directory (should be, but not all hosts have it yet), I need to download it from our site. But since it's close to 1MB, it can take a few seconds, so would like to show a messagebox, possibly with a progression bar or animation, with a Cancel button in case things go wrong. Does someone have some working code I could use to do this? Thank you ------------- Here's the code I wrote so far: Private Sub Form_Load() If Not FileExists(App.Path & "\" & WINVNC) Then bData() = Inet1.OpenURL("www.acme.com/myfile.exe" & WINVNC, icByteArray) Open App.Path & "\" & WINVNC For Binary As #1 Put #1, , bData() Close #1 If FileLen(App.Path & "\" & WINVNC) = 0 Then MsgBox "Error while downloading : size of " & WINVNC & " = 0 bytes", vbExclamation, Error downloading" Kill (App.Path & "\" & WINVNC) Unload Me End If End If End Sub - |
