PDA

Click to See Complete Forum and Search --> : Help I'm stuck i need some help with webbrowser controls and Inet controls


Azh
Mar 19th, 2000, 10:54 AM
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!

Mark Sreeves
Mar 22nd, 2000, 03:16 PM
is this the sort of thing you want?

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


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