您的位置:首页 > 编程语言 > C#

C# 调用浏览器打开网页链接

2013-03-23 15:57 435 查看
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
//Application.Run(new Class1());
int t = 0;
while (true)
{
t=t+1;

if (t >3)
{
System.Environment.Exit(System.Environment.ExitCode); //使用强制结束的话
}
System.Threading.Thread.Sleep(500);
System.Diagnostics.Process.Start("iexplore.exe", "http://www.baidu.com");   //调用IE

}
}
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: