//方法一
Process ps = new Process();
string yourURL = "http://www.fqjyxx.com";
ps.StartInfo.FileName = "iexplore.exe";
ps.StartInfo.Arguments = yourURL;
ps.Start();
//方法二比较直接,但不好用,不知道原因
* //System.Diagnostics.Process.Start(textBox2.Text.Trim());
*/
我的代码使用方法1 OK
if (textBox2.Text.Trim().Equals(""))
{
MessageBox.Show("请输入视频的URL地址!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
Process ps = new Process();
string yourURL = textBox2.Text.Trim();
ps.StartInfo.FileName = "iexplore.exe";
ps.StartInfo.Arguments = yourURL;
ps.Start();