Results 1 to 2 of 2

Thread: Help I'm stuck i need some help with webbrowser controls and Inet controls

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2000
    Location
    Chicago, IL
    Posts
    26
    Hello All,

    I need some help, I'm kinda stuck. I'm working with webbrowser and Inet controls. On a html page are absolute links. I chop off the url so what remains is the name of the html file or a directory. Example: if the website is www.abcdefg.com/page1.html becomes page1.html How would I go about saving these files?

    Please help me VB gurus! =)

    Thanks in advance!

  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    is this the sort of thing you want?

    put an Inet control, command button and image on a form....

    Code:
    Option Explicit
    
    Private Sub Command1_Click()
    Dim localFile As String
    Dim strURL As String
    Dim b() As Byte
    localFile = "c:\mark.jpg"
     
      strURL = "http://graffiti.virgin.net/dms.mbs/images/mark.jpg"
    
        ' Retrieve the file as a byte array.
        b() = Inet1.OpenURL(strURL, icByteArray)
        
        Open localFile For Binary Access _
        Write As #1
        Put #1, , b()
        Close #1
    Image1.Picture = LoadPicture("c:\mark.jpg")
    End Sub
    Mark
    -------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width