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

Opening the Internet Browser Programmatically

, 15 Aug 2011 CPOL
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);

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...
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)

Share

About the Author

kbo-mvs
Web Developer
Germany Germany
No Biography provided

| | Privacy | Terms of Use | Mobile
Web04 | 2.8.1411023.1 | Last Updated 15 Aug 2011
Article Copyright 2011 by kbo-mvs
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid