这样应该可以吧,我事先创建了3个webbrowser控件,然后开辟3个线程来操控。
[C#] 纯文本查看 复制代码
public List<WebBrowser> browserList = new List<WebBrowser>();
private void button1_Click(object sender, EventArgs e)
{
browserList.Add(webBrowser1);
browserList.Add(webBrowser2);
browserList.Add(webBrowser3);
for (int i = 0; i < 3;i++ )
{
Thread td = new Thread(new ParameterizedThreadStart(test));
td.SetApartmentState(ApartmentState.STA);
td.Start(browserList[i]);
}
}
private void test(object obj)
{
((WebBrowser)obj).Navigate("http://www.sufeinet.com/");
}
|