|
-
Jan 25th, 2002, 10:59 PM
#1
Thread Starter
Frenzied Member
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?
-
Jan 25th, 2002, 11:50 PM
#2
Fanatic Member
u can try this:
VB Code:
Do Until WebBrowser1.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop
-
Jan 26th, 2002, 12:01 AM
#3
Thread Starter
Frenzied Member
same problem.. the do loop will halt the entire program.. including other webbrowsers to progress to the next url in the list
-
Jan 26th, 2002, 01:05 AM
#4
Thread Starter
Frenzied Member
same problem.. the do loop will halt the entire program.. including other webbrowsers to progress to the next url in the list
anyone?
-
Jan 26th, 2002, 09:17 AM
#5
Frenzied Member
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:
If (pDisp Is WebBrowser1.Object) Then
'// Code to run when WebBrowser1 has completely loaded
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|