Click here to Skip to main content
15,880,891 members
Articles / General Programming / Internet
Tip/Trick

Opening the Internet Browser Programmatically

Rate me:
Please Sign up or sign in to vote.
5.00/5 (2 votes)
15 Aug 2011CPOL 47.3K   11  
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)


Written By
Student
Turkey Turkey
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
-- There are no messages in this forum --