Code Comments
Programming Forum and web based access to our favorite programming groups.I have a VB6 program which downloads a web page (using VB6 WebBrowser) and needs to get the text from the page. I have looked at the WebBrowser structure, and found the text from the page in several parts of the structure. I therefore decided to use 'wb1.Document.body.InnerText' ... p = InStr ( wb1.Document.body.InnerText, str) Is this the correct / best way to access the web page datwa? Will this work an client machine which have different versions of IE? Any help appreciated. thanks Garry
Post Follow-up to this messageThe Inet control is easier and quicker for this purpose. Unlike the WebBrowser, Inet doesn't render the page; it just retrieves it. pText = Inet.OpenURL(http://www.....) "Garry" <newsgroup@questinfo.com> wrote in message news:41d33b96$0$23006$cc9e4d1f@news.dial.pipex.com... > I have a VB6 program which downloads a web page (using VB6 WebBrowser) and > needs to get the text from the page. > > I have looked at the WebBrowser structure, and found the text from the page > in several parts of the structure. I therefore decided to use > 'wb1.Document.body.InnerText' ... > > p = InStr ( wb1.Document.body.InnerText, str) > > Is this the correct / best way to access the web page datwa? Will this work > an client machine which have different versions of IE? > > Any help appreciated. > > thanks > > Garry > >
Post Follow-up to this messageJezebel thanks for the Inet suggestion. How do I detect if it failed to get the page - does it return Null or "" ? Garry "Jezebel" <madbastard@whitehouse.gov> wrote in message news:u9guwAg7EHA.824@TK2MSFTNGP11.phx.gbl... > The Inet control is easier and quicker for this purpose. Unlike the > WebBrowser, Inet doesn't render the page; it just retrieves it. > > pText = Inet.OpenURL(http://www.....) > > > > "Garry" <newsgroup@questinfo.com> wrote in message > news:41d33b96$0$23006$cc9e4d1f@news.dial.pipex.com... and > page > work > >
Post Follow-up to this messageWhy not test it? Put in a wrong URL and see what happens... "Garry" <newsgroup@questinfo.com> wrote in message news:41d3450c$0$12227$cc9e4d1f@news.dial.pipex.com... > Jezebel > > thanks for the Inet suggestion. How do I detect if it failed to get the > page - does it return Null or "" ? > > Garry > > > "Jezebel" <madbastard@whitehouse.gov> wrote in message > news:u9guwAg7EHA.824@TK2MSFTNGP11.phx.gbl... > and > >
Post Follow-up to this messageLook into the State Event to determine the status of a page 'loading'. You could also use something like (air-code) Inet.URL http://www. Inet.Execute ,"GET" Private Sub Inet_StateChanged(State as Long) If State = 12 Then 'Get the page using the GetChunk method of the Inet control End If End Sub -- Chris Hanscom - Microsoft MVP (VB) Veign's Resource Center http://www.veign.com/vrc_main.asp -- "Garry" <newsgroup@questinfo.com> wrote in message news:41d3450c$0$12227$cc9e4d1f@news.dial.pipex.com... > Jezebel > > thanks for the Inet suggestion. How do I detect if it failed to get the > page - does it return Null or "" ? > > Garry > > > "Jezebel" <madbastard@whitehouse.gov> wrote in message > news:u9guwAg7EHA.824@TK2MSFTNGP11.phx.gbl... > and > >
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.