What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » "Reading" web page in VB6

"Reading" web page in VB6
Author: Message:
Salem
Senior Member
****

Avatar

Posts: 769
Reputation: 16
37 / Male / Flag
Joined: May 2004
O.P. Huh?  "Reading" web page in VB6
Hi

Can anybody on here help me to "read" data in a webpage from within a VB6 application?

I've embedded a (hidden) WebBrowser control which is where the page will be loaded. I'd like to be able to "read" a piece of the info in the Web page for use within my VB app.

The info I'll be reading will either be in a <div> tag, or I can put it in a text box. whichever works best.

Thanks in advance. I know one of you very knowledgeable people will be able to help

~Salem(@)

This post was edited on 03-18-2008 at 11:26 AM by Salem.
[Image: salem874.smart.jpg][Image: card.png]
Was i Helpful?[/url]
03-18-2008 11:25 AM
Profile PM Find Quote Report
Mike
Elite Member
*****

Avatar
Meet the Spam Family!

Posts: 2795
Reputation: 48
32 / Male / Flag
Joined: Mar 2003
RE: "Reading" web page in VB6
You can get the source code of a website by using the Inet control:

Ctrl-T -> Microsoft Internet Transfer Control -> OK

Add one, and then to get the source code of a website use:

code:
Dim strSourceCode as String
strSourceCode = Inet1.OpenURL("www.google.com")

Then, if the website's source code doesn't change too much, you can easily write some code that will get what you want ;)

This post was edited on 03-18-2008 at 12:52 PM by Mike.
YouTube closed-captions ripper (also allows you to download videos!)
03-18-2008 12:52 PM
Profile E-Mail PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: "Reading" web page in VB6
code:
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)

    Dim HTML
    HTML = pDisp.Document.body.innerhtml

    Debug.Print HTML

End Sub

Can also do

code:
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)

    Debug.Print pDisp.Document.body.innerhtml

End Sub

This post was edited on 03-18-2008 at 01:11 PM by matty.
03-18-2008 01:05 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On