c# 同时打开三个不同的网页

引用:http://zhidao.baidu.com/question/111142848.html

用默认浏览器打开: System.Diagnostics.Process.Start("http://www.hao123.com");

使用ie:

using System.Diagnostics;

Process.Start(@"C:\Program Files\Internet Explorer\iexplore.exe", "http://www.baidu.com/");

 

----------------------------------------------------------------------------------------------------

  int index = -1;
        string[] urls = new string[] { "www.baidu.com", "www.126.com", "www.xunlei.com" };
        private void button1_Click(object sender, EventArgs e)
        {
            for (int i = 0; i < 3; i++)
            {
                Thread th = new Thread(new ThreadStart(Run));
                th.Start();
            }
        }
        void Run()
        {
            index++;
            System.Diagnostics.Process p = new System.Diagnostics.Process();
            p.StartInfo.FileName = "iexplore";
            p.StartInfo.Arguments = urls[index];
            p.Start();
            p.Close();
            p.Dispose();
        }
上一篇:Kubernetes 安装Rook 1.3.11 ceph 14.2.10


下一篇:滴滴出行基于RocketMQ构建企业级消息队列服务的实践