我c#想生成一个exe文件,点击这个exe文件打开一个网址例如:http://community.csdn.net/ 

解决方案 »

  1.   

    Process.Start("IExplore.exe", "http://community.csdn.net/");  
    *****************************************************************************
    欢迎使用CSDN论坛专用阅读器 : CSDN Reader(附全部源代码) http://feiyun0112.cnblogs.com/
      

  2.   

    string uri = @"http://community.csdn.net/";
    System.Diagnostics.Process browser = new System.Diagnostics.Process();
    browser.StartInfo.FileName = "iexplore.exe";
    browser.StartInfo.Arguments = uri;
    browser.Start();
      

  3.   

            private void button1_Click(object sender, EventArgs e)
            {
                Process p = new Process();
                p.StartInfo.FileName = @"C:\Program Files\Internet Explorer\iexplore.exe";
                p.StartInfo.Arguments = @"http://community.csdn.net";
                p.Start();
            }
      

  4.   

    新建一个控制台应用程序,在main方法中写下如下代码:
    string uri = @"http://community.csdn.net/";
    System.Diagnostics.Process browser = new System.Diagnostics.Process();
    browser.StartInfo.FileName = "iexplore.exe";
    browser.StartInfo.Arguments = uri;
    browser.Start();
    然后编译,运行,在debug目录下就会找到生成的exe文件,把debug目录单独拷贝出来,双击其中的exe文件就行了。