how to change the text box's text into what URL that you're currently at.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • negus
    New Member
    • Jan 2010
    • 18

    how to change the text box's text into what URL that you're currently at.

    hello, i'm doing a final for my school and i need a little help if anyone could help that would be great.

    to start off im making a web browser i have everything down progress bar, buttons, favorites, history, blah blah.

    but i need to figure out a way that my text box changes to what website(URL) i am currently at. and this has been the only thing that i have tried searching for on the web. and cant seem to find anything but this code
    ----------------------
    Private Sub WebBrowser1_Sta tusTextChange(B yVal Text As String)
    Text1.Text = (WebBrowser1.Lo cationURL)
    Form1.Caption = (WebBrowser1.Lo cationName)
    End Sub
    ------------

    well if i enter in the code to VB the loctionURL and locationName are not command functions of VB?


    if someone would please help it would be greatly appreciated.
  • vb5prgrmr
    Recognized Expert Contributor
    • Oct 2009
    • 305

    #2
    Try...
    Code:
    Me.Caption = WB.Document.url


    Good Luck

    Comment

    • negus
      New Member
      • Jan 2010
      • 18

      #3
      under what sub? textbox i assume =0 or the mywebbrowser1.s atus changed?



      EDIT:

      it didnt work i changed the me.caption to me.textbox1=WB not a command so changed to mywebbrowser1. then the url not a function of VB or somthing

      Comment

      • vb5prgrmr
        Recognized Expert Contributor
        • Oct 2009
        • 305

        #4
        WB = name of control and it works fine after the navigate method is complete.



        Good Luck

        Comment

        • negus
          New Member
          • Jan 2010
          • 18

          #5
          also, anyone having the same problem as me. i figured its an VB8 issue.

          it also works with this code under the webbrowser1_doc umentcompleted sub
          TextBox1.Text = WebBrowser1.Url .ToString

          Comment

          • vb5prgrmr
            Recognized Expert Contributor
            • Oct 2009
            • 305

            #6
            Well considering that you are using .NET and this is a PRE .NET forum. i.e. Classic Visual Basic, might be another problem. In future, use correct forum...

            Comment

            Working...