Click here to Skip to main content
Click here to Skip to main content

Opening the Internet Browser Programmatically

, 18 Aug 2011
Given below is code for opening the Internet browser programmatically in VB 6 and VB.NET.VB 6Private Declare Function ShellExecute Lib "shell32.dll" Alias _ "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _ ByVal lpFile As String, ByVal lpParameters As...

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

15 Aug 2011
Caner Korkmaz
4 alternatives  
How to open the Internet browser from code.
15 Aug 2011
Kevin Marois
You're incorrect. Explorer is Windows Explorer, not Internet Explorer. Try this:System.Diagnostics.Process.Start("explorer");then this:System.Diagnostics.Process.Start("iexplore.exe", "http://www.codeproject.com");and this:System.Diagnostics.Process.Start("winword.exe",...
15 Aug 2011
kbo-mvs
I use this one in C++ (has the advantage that you can use your preferred browser ;-):ShellExecute (NULL, NULL, _T("http://www.codeproject.com"), NULL, NULL, SW_SHOWNORMAL);
17 Aug 2011
Michael B. Hansen
If I remember correctly, then I had some issues with the above method some years ago. It would not always work on some systems.I personally use the following method to get the EXE path to the system's default browser:public static string GetDefaultBrowser(){ string browser =...

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

thatraja
Web Developer
India India
Programmer | Dude | ||||||
 
About him & his blog? check out here. Currently he's updating the site, he'll return soon there with more things*.
 
In Codeproject, he posted a blogpost & more than couple of Tip/Tricks, hope he'll write more soon.
 
Favorite techs are MVC, WCF, Mobile, HTML5, CSS3, jQuery, etc.,
 
His hobbies are watching movies, CP, being alone, etc., But now he's working on something*.
 
* - SCAMP???
Follow on   Twitter   Google+   LinkedIn

| | Privacy | Mobile
Web02 | 2.8.140721.1 | Last Updated 18 Aug 2011
Article Copyright 2011 by thatraja
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid