Live Chat Icon For mobile
Live Chat Icon

How do I hit a web page from within a button handler in my Windows Forms application

Platform: WinForms| Category: Win32

Use the Process class found in the System.Diagnostics namespace.

	Process proc = new Process();
	proc.StartInfo.UseShellExecute = true;
	proc.StartInfo.FileName = @'http://www.microsoft.com';
	proc.Start();
	
	// or just put it all as one statement
	//System.Diagnostics.Process.Start(@'http://www.microsoft.com');

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.