求解决,在线等,
多线程开启两个Form,两个Form属于同一个类,类其中包含一个WebBrowser,报错
这里报错:this.webBrowser1 = new System.Windows.Forms.WebBrowser();这是我的主函数:
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(String[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Thread thread = new Thread(new ThreadStart(aaa));
thread.Start();
} public static void aaa()
{
//MessageBox.Show("//////////////");
Form1 a = new Form1();
a.ShowDialog();
}
}
多线程开启两个Form,两个Form属于同一个类,类其中包含一个WebBrowser,报错
这里报错:this.webBrowser1 = new System.Windows.Forms.WebBrowser();这是我的主函数:
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(String[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Thread thread = new Thread(new ThreadStart(aaa));
thread.Start();
} public static void aaa()
{
//MessageBox.Show("//////////////");
Form1 a = new Form1();
a.ShowDialog();
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货