我这样写的,没有错;private void listBox1_Click(object sender, System.EventArgs e)
{
Process myprocess=new Process ();
myprocess.StartInfo.FileName =this.listBox1.Items[this.listBox1.SelectedIndex].ToString () ;
myprocess.Start();
}
{
Process myprocess=new Process ();
myprocess.StartInfo.FileName =this.listBox1.Items[this.listBox1.SelectedIndex].ToString () ;
myprocess.Start();
}
Process myProcess = null;foreach(int i in listBox1.SelectedIndices)
{ myProcess = new Process(); myProcess.StartInfo.FileName = @"d:\" + listBox1.Items[i].ToString()+".url"; //用IE打开.url文件 myProcess.StartInfo.CreateNoWindow = false;
//上面已经是打开新窗口了啊!true也一样 myProcess.Start();}
使用完之后结束进程
myProcess.Kill();
你这样写还是会覆盖我已经打开过的网页static void Process.Start() 可以新开窗口,但是用不上
string url =this.listBox1.Items[this.listBox1.SelectedIndex].ToString () ;
Process.Start("IExplore.exe", url);