Results 1 to 2 of 2

Thread: URL bar problems

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2010
    Posts
    12

    URL bar problems

    Problem: i made a basic web-browser and i got it all to work except the URL bar... if i type something in and hit GO it works... but i want it to automatically tell me the URL of the website i'm on...

    the code i have tried was...


    Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
    TextBox1.Text = (WebBrowser1.Url.ToString)
    End Sub



    solution:

    Private Sub Navigate(ByVal address As String)

    If String.IsNullOrEmpty(address) Then Return
    If address.Equals("about:blank") Then Return
    If Not address.StartsWith("http://") And _
    Not address.StartsWith("https://") Then
    address = "http://" & address
    End If

    Try
    WebBrowser1.Navigate(New Uri(address))
    Catch ex As System.UriFormatException
    Return
    End Try

    End Sub

    Private Sub webBrowser1_Navigated(ByVal sender As Object, _
    ByVal e As WebBrowserNavigatedEventArgs) _
    Handles WebBrowser1.Navigated

    TextBox1.Text = WebBrowser1.Url.ToString()

    End Sub




    Quote Originally Posted by weirddemon View Post
    That's not how this works. What if you were searching for a resolution to an issue you had, to find that the OP just deleted his question and didn't post the answer?

    Frustrated, to say the least.

    This website, like others, is meant to help people. If you don't share your solution, how can others benefit from that knowledge?
    Last edited by axleman1011; Sep 21st, 2010 at 05:46 PM.

  2. #2
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    Re: URL bar problems

    Quote Originally Posted by axleman1011 View Post
    problem solved... please deleat...
    That's not how this works. What if you were searching for a resolution to an issue you had, to find that the OP just deleted his question and didn't post the answer?

    Frustrated, to say the least.

    This website, like others, is meant to help people. If you don't share your solution, how can others benefit from that knowledge?
    Last edited by weirddemon; Sep 20th, 2010 at 10:20 PM.
    CodeBank contributions: Process Manager, Temp File Cleaner

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width