borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (simulate slotted aloha protocol)Next Topic (Survey Editing Tool?) New Topic New Poll Post Reply
AndreaVB Forum : Internet Applications : Internet Transfer control
Poster Message
Sekar
Level: Sage

Registered: 11-03-2004
Posts: 63

icon Internet Transfer control

Using this following code block I can able to download any file from my home computer. When I tried in my office it dosen't download anything(even I provided proxy name, port uid/pwd). I use Internet Transfer control. Please advise. Thanks.

Private Sub cmdGo_Click()
Dim bytes() As Byte
Dim fnum As Integer

    cmdGo.Enabled = False
    txtFile.Enabled = False
    txtURL.Enabled = False
    Screen.MousePointer = vbHourglass
    DoEvents

    ' Get the file.
    bytes() = inetDownload.OpenURL( _
        txtURL.Text, icByteArray)

    ' Save the file.
    fnum = FreeFile
    Open txtFile.Text For Binary Access Write As #fnum
    Put #fnum, , bytes()
    Close #fnum

    cmdGo.Enabled = True
    txtFile.Enabled = True
    txtURL.Enabled = True
    Screen.MousePointer = vbDefault
    Beep
End Sub

31-03-2005 at 12:28 AM
View Profile Send Email to User Show All Posts | Quote Reply
Goran
Level: Moderator

Registered: 16-05-2002
Posts: 1681
icon Re: Internet Transfer control

You should put some checks in your code to see where it fails. For instance, check the bytes array tp see if it holds some data. If not, most probably you have some security issues, like firewall resitriction..

____________________________
If you find the answer helpful, please mark this topic as solved.

02-04-2005 at 03:56 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : Internet Applications : Internet Transfer control
Previous Topic (simulate slotted aloha protocol)Next Topic (Survey Editing Tool?) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder