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

Opening the Internet Browser Programmatically

, 17 Aug 2011
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 =...

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",...
18 Aug 2011
thatraja
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...
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);

License

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

Share

About the Author

Michael B. Hansen
Systems Engineer SPAMfighter
Denmark Denmark
I have a MCPD .NET 3.5 EAD and a Bsc in computer science, organizational theory and economics, and work as lead developer on SPAMfighter Exchange Module and SPAMfighter Mail Gateway in SPAMfighter, Europe's leading Anti Spam Filter developer.

| | Privacy | Mobile
Web01 | 2.8.140826.1 | Last Updated 18 Aug 2011
Article Copyright 2011 by Michael B. Hansen
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid