Print Page | Close Window

Detect when webbrowser document is fully loaded

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=16782
Printed Date: 23 November 2024 at 8:11am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Detect when webbrowser document is fully loaded
Posted By: DTeCH
Subject: Detect when webbrowser document is fully loaded
Date Posted: 01 June 2010 at 5:30pm
Hi,

I'm trying to get the event of the webbrowser control that indicates it's fully loaded...

...after All iframes, & everything else in the browser document is done loading.

Each frame in a document triggers cjBrowser1_DocumentComplete when it's done loading, so

the following attempts to compare the frame that triggered DocumentComplete to the parent browser window.

If it matches, then it will set xWebB3Done to True.

I've tried :

(xWebB3Done is set to False before cjBrowser1 navigates)



Private Sub cjBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)

    If
(pDisp Is cjBrowser1.Object) Then
        xWebB3Done = True <================<< this is NEVER hit no matter what.
        ' Finished Loading
    Else
        ' Do nothing
    End If

End Sub



cjBrowser1_DocumentComplete is fired several times during a single page load.

pDisp say's it's "Microsoft Web Browser Control" at each, & every firing of a single page load.

What else can I do?

(VB6 on Vista)



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net