Home All Groups Group Topic Archive Search About

ieexplorer process.start() error status

Author
8 Mar 2006 3:56 PM
jrbareta
I am using VS2003 and my windows program may try to goto a URL site. I do
this by starting a browser process thread   p.start(). If the web page
cannot be found or a connection to the internet is not present, the browser
shows an error message in its display. I have not been able to figure out
how to get the brower's error code, so the calling windows program can do
additional processing.
   Can this be done? I am really open to suggestions on how to do this.

Author
8 Mar 2006 10:06 PM
Jeroen-bart Engelen
jrbareta wrote:
> I am using VS2003 and my windows program may try to goto a URL site. I do
> this by starting a browser process thread   p.start(). If the web page
> cannot be found or a connection to the internet is not present, the browser
> shows an error message in its display. I have not been able to figure out
> how to get the brower's error code, so the calling windows program can do
> additional processing.
>    Can this be done? I am really open to suggestions on how to do this.

How do you open the browser? Do you just call Process.Start("url")? I
would personally include the mshtml COM object and use interop to use
the InternetExplorer COM object. This starts a stand-alone browser for
you, of which you have complete control. You can subscribe to all kinds
of events such as the NavigateError event.
The only thing against it is that it may require a bit more effort than
using a standard .NET class. Have a look at
http://msdn.microsoft.com/workshop/browser/webbrowser/reference/objects/internetexplorer.asp
for more info.

Jeroen-bart Engelen

AddThis Social Bookmark Button