VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Read Webpages with Inet (shows all of the source)

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.

Rate Read Webpages with Inet (shows all of the 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

Download this snippet    Add to My Saved Code

Read Webpages with Inet (shows all of the source) Comments

No comments have been posted about Read Webpages with Inet (shows all of the source). Why not be the first to post a comment about Read Webpages with Inet (shows all of the source).

Post your comment

Subject:
Message:
0/1000 characters