C# winfrom单击事件弹出浏览器

1.创建单击事件(标红字段可设置打开的网页地址)

C# winfrom单击事件弹出浏览器

 private void buttonItem28_Click(object sender, EventArgs e)
        {
            Process p = new Process();
            p.StartInfo.FileName = "cmd.exe";
            p.StartInfo.UseShellExecute = false;//关闭Shell的使用
            p.StartInfo.RedirectStandardInput = true;//重定向标准输入
            p.StartInfo.RedirectStandardOutput = true;//重定向标准输出
            p.StartInfo.RedirectStandardError = true;//重定向错误输出
            p.StartInfo.CreateNoWindow = true;//设置不显示窗口
            p.Start();
            p.StandardInput.WriteLine(@"start iexplore.exe www.baidu.com");
            p.StandardInput.WriteLine("exit");
        }