Results 1 to 5 of 5

Thread: Help with DocumentComplete for a webbrowser

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2000
    Posts
    1,195

    Help with DocumentComplete for a webbrowser

    How can i get a similar event that fires when the page is loaded?

    DocumentComplete will fire many times on a page with iframes and frames.. one for each document..

    how can i find out when the webbrowser is done loading?

    I can use
    Code:
    Do
    Doevents
    Loop until WB.Busy = False
    but that will halt the entire program.. Im trying to make a multithrearded webbrowser app, where there are 5 browsers working together. When a webbrowser is done loading a page, t goes on the next one in a list, but neither the doevents loop will work (because it will halt other browsers from progressing) or the DocumentComplete method (because it will fire many times.. and the browsers will move to the next site before the current one is fully loaded)

    Anyone know how to solve my dilemma?

  2. #2
    Fanatic Member stickman373's Avatar
    Join Date
    Mar 2001
    Location
    MA
    Posts
    909
    u can try this:

    VB Code:
    1. Do Until WebBrowser1.ReadyState = READYSTATE_COMPLETE
    2. DoEvents
    3. Loop


  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2000
    Posts
    1,195
    same problem.. the do loop will halt the entire program.. including other webbrowsers to progress to the next url in the list

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2000
    Posts
    1,195
    same problem.. the do loop will halt the entire program.. including other webbrowsers to progress to the next url in the list

    anyone?

  5. #5
    Frenzied Member
    Join Date
    Mar 2001
    Location
    You are HERE •™
    Posts
    1,300
    Try using this code in your Doc-Complete event. MSDN defines "pDisp" = "Object that specifies the top-level or frame WebBrowser object corresponding to the event."
    VB Code:
    1. If (pDisp Is WebBrowser1.Object) Then
    2.     '// Code to run when WebBrowser1 has completely loaded
    3. End If

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