Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I have tons of books, have book marked tons of tutorials, which have helped, but this forum has answered those "impossible to find" solutions. I am thrilled with this site..."

Geography

Where in the world do Tek-Tips members come from?
kennedymr2 (Programmer)
22 Jul 12 20:40
Using wc As New System.Net.WebClient()

Try
wc.DownloadFile(Server1 & FileName4, Filename3)
AddHandler wc.DownloadProgressChanged, AddressOf pchanged
AddHandler wc.DownloadFileCompleted, AddressOf done
Catch ex As WebException
' MsgBox(ex.ToString)
End Try

End Using


Do While DoneX = False
System.Windows.Forms.Application.DoEvents()
Loop


Sub done(ByVal sender As Object, ByVal e As System.ComponentModel.AsyncCompletedEventArgs)

If e.Error Is Nothing Then
'MsgBox("Download completed!")
Else
'MsgBox(e.Error.Message)
End If

DoneX = True

End Sub

When i carry out the above functions in most cases it works 100% .. but on just a few files the donex does not get set to True......

When i look at the file in the output directory it is there but shows 0 size.... if i open the file in notepad there is data in there...if i completely close the program ie stop debugging......the file size does then shows up as eg 18kb..

On small files i do not have the problem, its only in larger files.

Appreciate any ideas

Regards Kennedymr2

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close