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
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
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
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.