BP Forums
Read Webbrowser url box - Printable Version

+- BP Forums (https://bpforums.info)
+-- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=55)
+--- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=56)
+---- Forum: VB.NET (Visual Basic 2010/2008) (https://bpforums.info/forumdisplay.php?fid=8)
+---- Thread: Read Webbrowser url box (/showthread.php?tid=312)



Read Webbrowser url box - Protection4Real - 02-17-2011

Yes hello, i was wondering if anyone knows how to get the text of the current website that you are navigating to and then i mean webbrowsers like internet explorer firefox google chrome. example website url/text:

<!-- m --><a class="postlink" href="http://www.Google.com">http://www.Google.com</a><!-- m -->

i hope someone can help me with this <!-- sSmile --><img src="{SMILIES_PATH}/icon_e_smile.gif" alt="Smile" title="Smile" /><!-- sSmile -->


Re: Read Webbrowser url box - xolara - 02-17-2011

Hello

This is for the "Title" from the website

Code:
Private Sub WebBrowser1_Navigating(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserNavigatingEventArgs) Handles WebBrowser1.Navigating
        Me.Text = WebBrowser1.DocumentTitle
    End Sub

This is for the "Url" from the navigated website

Code:
Private Sub WebBrowser1_Navigating(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserNavigatingEventArgs) Handles WebBrowser1.Navigating
        Me.Text = WebBrowser1.Url.AbsoluteUri

    End Sub

but if you want to "Text" from the website and i assume that you mean text only i will have to work on that one a little


Re: Read Webbrowser url box - redpois0n - 02-17-2011

If u mean what i am thinking of, u can do this trick.
Code:
WebBrowser1.Document.Body.InnerText

That will return a string of all text visible in webbrowser control.

If you want all HTML text, then use this
Code:
WebBrowser1.DocumentText

~redpois0n


Re: Read Webbrowser url box - Protection4Real - 02-21-2011

well i want to get the url from Webbrowsers like internet explorer and firefox and google chrome <!-- sBig Grin --><img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt="Big Grin" title="Very Happy" /><!-- sBig Grin -->

if i navigate to youtube with firefox i want to see that i do that in the application <!-- s:mrgreen: --><img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green" /><!-- s:mrgreen: -->


Re: Read Webbrowser url box - brandonio21 - 02-21-2011

I think for this you will have to access the browsers history, and rescan is every minute or so. All browser's history is stored in a file on the computer itself. For example, here is Firefox :
<!-- m --><a class="postlink" href="http://answers.yahoo.com/question/index?qid=20071011162335AAACp1v">http://answers.yahoo.com/question/index ... 335AAACp1v</a><!-- m -->


Re: Read Webbrowser url box - Protection4Real - 02-22-2011

Well i didnt really find any answer there xD


Re: Read Webbrowser url box - brandonio21 - 02-22-2011

Doh xD. Well, I'm not really sure how to access the current page ... You can always try googling it! I'll get back to you if I find an answer tho <!-- sTongue --><img src="{SMILIES_PATH}/icon_razz.gif" alt="Tongue" title="Razz" /><!-- sTongue -->