by Matthew Gates (16 Submissions)
Category: Internet/HTML
Compatability: Visual Basic 3.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating:
(4 Votes)
This code uses the MSInet.ocx control to read webpages. Since Inet has a bug with it's OpenURL function, it uses the GetChunk method instead.
Assumes
Requirements: Richtextbox.ocx, MSInet.ocx
Code Returns
The code returns all of the webpage's source.
Screen.MousePointer = 11
Dim ReturnStr As String
RichTextBox1.Text = Inet1.OpenURL("http://www.planet-source-code.com", icString)
ReturnStr = Inet1.GetChunk(2048, icString)
Do While Len(ReturnStr) <> 0
DoEvents
RichTextBox1.Text = RichTextBox1.Text & ReturnStr
ReturnStr = Inet1.GetChunk(2048, icString)
Loop
Screen.MousePointer = 0