日期:2014-05-20 浏览次数:20837 次
private void Form1_Load(object sender, EventArgs e)
{
webBrowser1.Navigate("http://bbs.csdn.net/forums/DotNET/");
}
public FormMain()
{
InitializeComponent();
string url = @"http://bbs.csdn.net/topics/390668250";
Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.ClassesRoot.OpenSubKey(@"http\shell\open\command\");
string s = key.GetValue("").ToString();
string app = s.Substring(0, s.Length - 5);
System.Diagnostics.Process.Start(app, url);
Application.Exit();
System.Environment.Exit(System.Environment.ExitCode);
System.Threading.Thread.CurrentThread.Abort();
Process.GetCurrentProcess().Kill();
Application.ExitThread();
}