Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inet Control Performance problem 3

Status
Not open for further replies.

skiflyer

Programmer
Sep 24, 2002
2,213
US
I use an INet control to download a few files... and any files over 10 or so megs are just unbearably slow. I have other programs which download the same files usings BITS technology, and also a similar program using the WebClient in .NET and in both those cases the downloads run just fine... so I'm able to eliminate network issues and the like... and basically narrow it down to this INet Control.

Is there a better way for me to download large files from within a VB 6.0 Program, or even just another option I could play with?

Below is how I'm using INet control to download the files...

Code:
Private Sub GetFile(sSource As String, sDestination As String)
    Debug.Print sSource, sDestination
    Dim x() As Byte
    Inet1.URL = sSource
    x = Inet1.OpenURL(, icByteArray)
    Open sDestination For Binary Access Write As #1
    Put #1, , x()
    Close #1
End Sub

Thanks for any and all help.

-Rob
 
Great, I'll put that loop in and see what happens... but first I'm having trouble with this vbModal, that syntax doesn't work for me...

statusForm.load <--- Method or data member not found

Load statusForm vbModal <-- Syntax error

Now I understand, but I'm lost on the darn syntax!

-Rob
 
Ok, all done!

turns out,

formName.Show Modal

seemed to be what I was looking for, but I ended up not using it... turns out, just inserting the
Do While Inet1.StillExecuting
DoEvents
Loop

Was all I needed... it's a bit of a strange setup, but it's pretty effective, here's the system for anyone who's curious...


Form1 does lots of stuff

Form1 sets text1 & text2 on Form2

When Form2 senses a change in text2 it shows itself and launches the download

When the download finishes it unloads itself

Form1 loops and keeps setting the fields on Form2 until it's done.

Wonderful, again, thanks for all the help!

-Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top