Results 1 to 4 of 4

Thread: Knowing Webbrowser events in VB6

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2007
    Posts
    45

    Knowing Webbrowser events in VB6

    Hi,
    I am using webbrowser conntrol VB6 to open a webpage. Is there any way to know that when a page is opened successfully or when it goes in error because of any reason like no internet connection or page is moved?

    Thnks in advance guys for help.

    Ashish

  2. #2
    Addicted Member
    Join Date
    Jan 2006
    Posts
    248

    Re: Knowing Webbrowser events in VB6

    I never tried to test for that... so there may be another way.

    I am seeing (in a sample I tried) that anytime the page won't display (no connection, no page, etc.) that if you check the text returned in the TitleChange event, you will get a "No page to display".


    Private Sub WebBrowser1_TitleChange(ByVal Text As String)
    msgbox Text
    End Sub

    I hope that will help
    Mike

  3. #3

    Thread Starter
    Member
    Join Date
    Dec 2007
    Posts
    45

    Re: Knowing Webbrowser events in VB6

    Thnks for the response.If no connection is there then it will diplay the message " NO page to display". sometime it opens a google search with the text provided in the address bar. In that case also the page is not found but the message displayed is not the actual one.any help..


    Ashish

  4. #4
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: Knowing Webbrowser events in VB6

    You can use the _NavigateError event which is triggered when an error happens, you should be able to look at the StatusCode to determine what sort of error it was.

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