Launch WebBrowser

  • Thread starter Thread starter rob
  • Start date Start date
R

rob

How can I launch a webbrowser from my windows forms applications? The
reason I need that is because I have a DataGridView with links in one
of the columns. When clicking on it I process the click and then want
to start a webbrowser loading the site that the link was pointing to.

Thanks,
Rob
 
rob said:
How can I launch a webbrowser from my windows forms applications? The
reason I need that is because I have a DataGridView with links in one
of the columns. When clicking on it I process the click and then want
to start a webbrowser loading the site that the link was pointing to.

Use the Process class as this little C# hack does :

using System;
using System.Diagnostics;

class Class1
{
static void Main(string[] args)
{
Process proc;

proc = new Process();

proc.StartInfo.FileName = "http://msdn.microsoft.com";
proc.StartInfo.Verb = "open";
proc.StartInfo.UseShellExecute = true;
proc.Start();
}
}

Regards,
Will
 
Back
Top