Print Page | Close Window

Problem with the Webbrowser Control

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=18069
Printed Date: 27 November 2024 at 7:23am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Problem with the Webbrowser Control
Posted By: ProScan
Subject: Problem with the Webbrowser Control
Date Posted: 18 March 2011 at 7:49am
Hello...

I have 2 Forms for a simple Test..

Form1: works with the MS Browser Control shdocvw.dll
Form2: works with the Codejock Browser Control

When i start then Form1, i load a simpe Website with Frames.
in the DocumentComplete event i have the pDisp Object to look, is the
Framewebsite complete for load.

Form1: with MS Browser

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

    If (pDisp Is Browser.Object) Then
        If InStr(1, URL, "testsite.html") > 0 Then
            MsgBox "Site comlete !
        End If
    End If

    '- WORKS PERFECT -

End Sub


  
Form2: with Codejock Browser

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

     If (pDisp Is Browser.Object) Then
        If InStr(1, URL, "testsite.html") > 0 Then
            MsgBox "Site comlete !
        End If
    End If

   '- Works not !!!! -> The pDisp Object is not the Browser.Object

End Sub

with this routine and the codejock Browser i can't check a special site..

any idears ???

Greetings

ProScan




Replies:
Posted By: Oleg
Date Posted: 18 March 2011 at 8:43am
Use Application property in both cases

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

    If (pDisp Is WebBrowser2.Application) Then
        If InStr(1, URL, "testsite.html") > 0 Then
            MsgBox "Site comlete !"
        End If
    End If

    '- WORKS PERFECT -

End Sub



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: ProScan
Date Posted: 18 March 2011 at 8:52am
Hello oleg,
thanks for help, it work's !

Proscan



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