Click here to Skip to main content
15,174,448 members
Articles / General Programming / Internet
Tip/Trick
Posted 15 Aug 2011

Stats

46.5K views
11 bookmarked

Opening the Internet Browser Programmatically

Rate me:
Please Sign up or sign in to vote.
5.00/5 (2 votes)
15 Aug 2011CPOL
How to open the Internet browser from code.

If you type something like:


explorer http://www.codeproject.com

in an Explorer window or Command Prompt, then the Internet browser you use will open :). You can use it like this in code:
C++
#include <stdlib.h>
main()
{
    system("explorer http://www.codeproject.com");
}

in C++. Or:


C#
System.Diagnostics.Process.Start("explorer","http://www.codeproject.com");

in C# :)

License

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

Share

About the Author

Caner Korkmaz
Student
Turkey Turkey
No Biography provided

Comments and Discussions

 
-- There are no messages in this forum --