//方法一
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();