Results 1 to 8 of 8

Thread: URL box [SOLVED]

  1. #1

    Thread Starter
    Hyperactive Member boku's Avatar
    Join Date
    Dec 2004
    Posts
    386

    Resolved URL box [SOLVED]

    Ok, i have added a webbrowser to my small app and a textbox, is there a way to code it so that if the webpage changes so does the text in the textbox to show the website address?
    Last edited by boku; Feb 28th, 2005 at 10:30 PM.
    -BoKu-

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: URL box

    In the click event that loads new pages:

    VB Code:
    1. Private Sub cmdGo_Click()
    2. WebNavigate txtURL.Text
    3. mytextbox.text = textURL.text
    4. End Sub

  3. #3

    Thread Starter
    Hyperactive Member boku's Avatar
    Join Date
    Dec 2004
    Posts
    386

    Re: URL box

    ok say that the home page is google and i do a seach on there...and click a link, i want the textbox to show me the address of that website. so it changes from google.com to whateva.com
    -BoKu-

  4. #4
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: URL box

    I think it would go in the download complete action, but I don't have that in my web sample app. never even noticed that the url doesn't change.

  5. #5

    Thread Starter
    Hyperactive Member boku's Avatar
    Join Date
    Dec 2004
    Posts
    386

    Re: URL box

    lol, i didnt until i studied it...maybe you can help me on something else then...i have all my history in a combo box, but is there anyway to stop the same address appearing in it twice, and is there anyway to sort it in reverse, so that the first url u visit goes to the bottom of the list?
    -BoKu-

  6. #6
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: URL box

    You can specify an index for a combobox. Clear it each time, as I think you would have to write the list backwards each time you wanted to add an item. the first time, you woud leave 0 blank, and write the first item to 1. then you would leave 0 blank, and first one to item 1 and the second to item 2. Use the index.
    VB Code:
    1. object.additem item, index

    Each time you are adding a item, if it already exists, don't add it at the old place, but add it to the bottom of the list.

    also, i think you could use the document complete action to write the new url in your textbox.

  7. #7

    Thread Starter
    Hyperactive Member boku's Avatar
    Join Date
    Dec 2004
    Posts
    386

    Re: URL box [SOLVED]

    oh ok kl, cheers.
    -BoKu-

  8. #8
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: URL box [SOLVED]

    Glad it worked out for you.

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