I have a WebBrowser Component in my Form but I want it to never say "This Page Cannot be Displayed...........
Is there a wat to make it say a text you want?????
Last edited by LawnNinja; Aug 25th, 2006 at 06:12 PM.
You could either make it go to a html page you upload somewhere when the form loads, you could make it navigate to the user selected home page (set in internet options), or you could make it navigate to a html page that is kept in the same folder of the program when the form loads.
The "This page cannot be displayed" is a server-side page so it isn't as simple as that. You could check the URL of the page on documentcomplete() to see if it matches a 404 error page, or you could check the source of each page for "This page cannot be displayed"...just options :-)
I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!
And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.
I have made a little research about "This page cannot be displayed". You have to change the "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\AboutURLs\NavigationFailure" registry key. Here's a sample.
I have made a little research about "This page cannot be displayed". You have to change the "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\AboutURLs\NavigationFailure" registry key. Here's a sample.
The problem with that being, Internet Explorer would also not show this page..
Perhaps you should reset it back to its original setting when closing your program? Or even better, checking the source of the page on an off-screen Webbrowser control. If it contains "Page cannot be displayed", then don't show it in the main WebBrowser. If it doesn't, then show it in the main browser.
Originally Posted by smUX
The "This page cannot be displayed" is a server-side page so it isn't as simple as that. You could check the URL of the page on documentcomplete() to see if it matches a 404 error page, or you could check the source of each page for "This page cannot be displayed"...just options :-)
No it isn't. It resides inside a dll in the system32 folder..