Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open a URL from Windows Forms

Tags:

.net

winforms

I'm trying to provide a link to my company's website from a Windows Form. I want to be well behaved and launch using the user's preferred browser.

What is the best way to open a URL in the user's default browser from a Windows Forms application?

like image 404
Adrian Clark Avatar asked Sep 12 '08 00:09

Adrian Clark


People also ask

How do I run a Winforms application in the browser?

You can right-click on the icon and then click on the 'Open Web Browser'. A Web browser window will open and your application will be running inside.


1 Answers

This article will walk you through it.

Short answer:

ProcessStartInfo sInfo = new ProcessStartInfo("http://mysite.com/");   Process.Start(sInfo); 
like image 84
Blorgbeard Avatar answered Nov 10 '22 01:11

Blorgbeard