Thread: WebBrowser

  1. #1
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008


    I have some difficulties using the WebBrowser control which I don't seem to be able to overcome.

    The problem is that there is no way to indicate when it has fully navigated on a webpage. It seems to do it by steps.

    The only thing available seems to be the Navigated Event Handler. But it doesn't seem to work. It fires up twice but still the page is not fully loaded.

    What I do is after the page loads I use the GetElementById() method to get what I want, but it doesn't always work.

    I tried to use a while(..) loop with GetElementById() method and that part works. It waits until that element loads. Until here OK.

    The thing is that I want to search also for elements that might not exist. I simulate a Search Engine search, so some elements will be missing depending on the search (like if there are no results or if there are no sponsored links).

    The only thing I can think is to put a delay. I know that works, but it will slow a lot the whole search, where speed is kind of an issue. It is an issue because somebody might have a very fast or a very slow connection so there is no way to put a constant delay that will work for everybody

  2. #2
    Registered User valaris's Avatar
    Join Date
    Jun 2008
    RING 0

  3. #3
    Registered User C_ntua's Avatar
    Join Date
    Jun 2008
    Argh! How didn't I miss that? Was looking for something like that for a long time.

    Though, it doesn't work completely. For example it first twice. Well, that can be fixed of course, but it is kind of risky in the sense that "does it fire twice all the time or will it make it freeze on some occasions?"

    Still have some problems, but I will work on them. It is much better than Navigated since now I know that the Document has also loaded (one step further).

    Thanks a lot

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Open exrternal file in a WebBrowser control
    By rebeccar in forum C# Programming
    Replies: 3
    Last Post: 05-26-2010, 09:46 AM
  2. WebBrowser control
    By Overlord in forum Windows Programming
    Replies: 3
    Last Post: 12-21-2008, 06:06 AM
  3. Creating a webbrowser?
    By nubby in forum C Programming
    Replies: 7
    Last Post: 12-17-2007, 03:46 PM
  4. erase cookies cookie from webbrowser control
    By hanhao in forum C++ Programming
    Replies: 1
    Last Post: 07-23-2007, 01:28 PM
  5. newbie help webbrowser / .Net Framework 2.0 issue
    By Knackrud in forum C++ Programming
    Replies: 5
    Last Post: 03-01-2006, 08:52 AM