Board index » Visual Studio » Downloading from the Net w/ progression bar?

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


-
 

Re:Downloading from the Net w/ progression bar?

Download with Progressbar:

http://www.veign.com/vrc_codeview.asp?type" rel="nofollow" target="_blank">www.veign.com/vrc_codeview.asp=app&id=67



--

Chris Hanscom - Microsoft MVP (VB)

Veign's Resource Center

www.veign.com/vrc_main.asp">www.veign.com/vrc_main.asp

Veign's Blog

www.veign.com/blog">www.veign.com/blog

--





"Vincent Delporte" <vincent.delporte@wanadoo.fr>wrote in message

Quote
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"">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





-

Re:Downloading from the Net w/ progression bar?

On Tue, 9 May 2006 10:52:09 -0400, "Veign" <NOSPAMinveign@veign.com>

wrote:

Thx!

-