Popular Articles
Last viewed:
- Get the list of ODBC data source names programatically using C#
- SQL Server Database Project and Database Source Control
- C# Download File with Progress Bar
- Install Windws 2003 Terminal Service Licenses (Remote Desktop)
- SQL Create Table Add Description to Column
- Windows Server 2003 Configure RRAS (Routing and Remote Access Service) Site to Site VPN
Recent comments
- Reply
1 day 19 hours ago - Thank you!
6 days 9 hours ago - Thanks!!
6 days 9 hours ago - Lotus Email Server Stop
1 week 18 hours ago - awesome article masssthhh
1 week 2 days ago - Awesome!
2 weeks 8 hours ago - get blank pdf
2 weeks 1 day ago - TXLDnoMyeLVmZKXPTJT
2 weeks 4 days ago - hPLvcrWMPCDOIpXDg
2 weeks 6 days ago - JijKgYDvBZXRZ
2 weeks 6 days ago

easy
string target= "http://www.microsoft.com";
//Use no more than one assignment when you test this code.
//string target = "ftp://ftp.microsoft.com";
//string target = "C:\\Program Files\\Microsoft Visual Studio\\INSTALL.HTM";
try
{
System.Diagnostics.Process.Start(target);
}
catch
(
System.ComponentModel.Win32Exception noBrowser)
{
if (noBrowser.ErrorCode==-2147467259)
MessageBox.Show(noBrowser.Message);
}
catch (System.Exception other)
{
MessageBox.Show(other.Message);
}