private void button5_Click(object sender, System.EventArgs e)
{
System.Diagnostics.Process ie = new System.Diagnostics.Process();
ie.StartInfo.FileName = "IEXPLORE.EXE";
ie.StartInfo.Arguments = "http://www.csdn.net";
ie.Start();
}

解决方案 »

  1.   

    达个便车问一下 hbxtlhx(最后一片绿叶) 的方法是不是也可以用于在一个程序中打开另一程序阿。
      

  2.   

    对,就用PROCESS这个方法来实现的,呵,如果不愿意,可以试试API也行,不过比较烦就是
      

  3.   

    System.Diagnostics.Process.Start("http://www.csdn.net");
      

  4.   

    BY THE WAY那要是我打開的網頁上有個文本槓
    我希望傳個"ABC"過去應當怎麼做呢
      

  5.   

    hbxtlhx(最后一片绿叶) System.Diagnostics.Process ie = new System.Diagnostics.Process();
    ie.StartInfo.FileName = "IEXPLORE.EXE";
    ie.StartInfo.Arguments = "http://www.csdn.net";
    ie.Start();这样调可以吗?ie会不会在前面和后面加上一串字符串(自动在前面加http://   自动在后面加/20%)?不过我知道这样用mathon是绝对可以打开本地文件或者网页的。
    例如:
    using System.Diagnostics;        //其他代码(略) private void btnDone_Click(object sender, System.EventArgs e)
    {
    string mathonPath=@"C:\Program Files\Maxthon\\Maxthon.exe";
    string iePath=@"C:\Program Files\Internet Explorer\IEXPLORE.EXE"; Process p = new Process();
    //设定程序名
    p.StartInfo.FileName=mathonPath;

    //关闭Shell的使用
    p.StartInfo.UseShellExecute = false;
    //重定向标准输入
    p.StartInfo.RedirectStandardInput = true;
    //重定向标准输出
    p.StartInfo.RedirectStandardOutput = true;
    //重定向错误输出
    p.StartInfo.RedirectStandardError = true;
    //设置不显示窗口
    p.StartInfo.CreateNoWindow = true; p.StartInfo.Arguments="D:\\pic\\01.jpg";
             /*或者打开一个网页
             p.StartInfo.Arguments="www.gdxtgt.com.cn";
             */
    p.Start()
    请看看我提的一个问题:
    http://community.csdn.net/Expert/topic/3649/3649562.xml?temp=.7207758说的就是这个问题。