Below are two ways to have a C# program start the browser with a URL.
Sample program #1
Add Reference to Microsoft.VisualBasic
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Microsoft.VisualBasic;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string strURL = "http://www.CodeProject.com";
if (strURL.Length > 0)
{
int hPID = Interaction.Shell("cmd /c Start " + strURL, AppWinStyle.Hide);
}
}
}
}
Tested with C# 2012 .NET Framework 4.0
Sample Program #2
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Diagnostics;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Process myProcess = new Process();
try
{
myProcess.StartInfo.UseShellExecute = true;
myProcess.StartInfo.FileName = "http://www.CodeProject.com";
myProcess.StartInfo.CreateNoWindow = true;
myProcess.Start();
}
catch (Exception ex)
{
MessageBox.Show (ex.Message);
}
}
}
}
Tested with C# 2012 .NET Framework 4.0