Webbrowser navigates through an array RRS feed

  • Question

  • Hello everyone,On my project form I have a webbrowser that navigates to different pages specified by an array,


    then i have the webbrowser set to collect all the images from that website and put it in a listbox.


    However, when i click the button to start this process on my form, the webbrowser just skips to the last array string in my array.


    for example:

    I have on a textbox the text: "I,Am,Cool,SubliminalMessage"

    when i click the start button on my form, i have the text split into an array by the commas then i have the webbrowser navigate through all of these array elements.


    The problem is, it would automatically skip through the other web pages and end up just grabbing the images off "SubliminalMessage"


    here is my code to split the textbox text and put it in an array then have the browser start navigating:


        Dim search As Array = TextBox1.Text.Split(",")
        For Each find As String In search
          WebBrowser1.Navigate("http://www.ask.com/pictures?qsrc=2990&o=0&l=dir&q=" + find)


    Could anyone possibly point me in the right direction to go?


    Please and thank you.

    Saturday, July 31, 2010 6:19 PM


  • The problem should be quite simple to figure out.

    What you are doing is navigating to a new address until the last address navigated. The reason why only the last web page loads is because you only use 1 webbrowser. You should create a tabbed webbrowser and load each search in a new tab.

    To get you started, change WebBrowser1.Navigate to Process.Start, which should load 4 different pages.

    • Proposed as answer by Bin-ze Zhao Wednesday, August 4, 2010 6:42 AM
    • Marked as answer by Alex Liang Wednesday, August 4, 2010 7:04 AM
    Sunday, August 1, 2010 8:06 AM