Wednesday, September 3, 2008

Launch Internet Explorer or Default Browser from VB.NET (or C#)

I found several ways to launch IE from VB.NET, but the following approach appears to be the simplest:


Process.Start("IExplore.exe", "http://dotnetref.blogspot.com")


More information at:

http://bytes.com/forum/thread413370.html


If you want to launch the default browser (such as Firefox), it may be easiest to just say the following:

Process.Start("http://dotnetref.blogspot.com")


and let the Shell do the work of deciding th default browser.

For more info on this approach:

http://www.vbforums.com/showthread.php?t=323257


The C# approach is not any different, just use the approprate syntax.

2 comments:

Max said...

nice, thanks man

Anonymous said...

Clean and nice explanation! TnX!