th = new Thread(ab);
th.IsBackground = true; //线程后运行
th.Start(); //启动线程
public void ab()
{
HtmlElement check = webBrowser1.Document.GetElementById("checkout-now").InvokeMember("click");
}
每次执行到ab()里显示,制定的转换无效。请问是什么原因??谁能告诉我?未处理 System.InvalidCastException
Message="指定的转换无效。"
Source="System.Windows.Forms"
StackTrace:
在 System.Windows.Forms.UnsafeNativeMethods.IHTMLDocument2.GetLocation()
在 System.Windows.Forms.WebBrowser.get_Document()
在 苹果自动订货.Form1.ab() 位置 C:\Users\DotA\Desktop\11\苹果自动订货\苹果自动订货\Form1.cs:行号 44
在 System.Threading.ThreadHelper.ThreadStart_Context(Object state)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
在 System.Threading.ThreadHelper.ThreadStart()
InnerException:
th.IsBackground = true; //线程后运行
th.Start(); //启动线程
public void ab()
{
HtmlElement check = webBrowser1.Document.GetElementById("checkout-now").InvokeMember("click");
}
每次执行到ab()里显示,制定的转换无效。请问是什么原因??谁能告诉我?未处理 System.InvalidCastException
Message="指定的转换无效。"
Source="System.Windows.Forms"
StackTrace:
在 System.Windows.Forms.UnsafeNativeMethods.IHTMLDocument2.GetLocation()
在 System.Windows.Forms.WebBrowser.get_Document()
在 苹果自动订货.Form1.ab() 位置 C:\Users\DotA\Desktop\11\苹果自动订货\苹果自动订货\Form1.cs:行号 44
在 System.Threading.ThreadHelper.ThreadStart_Context(Object state)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
在 System.Threading.ThreadHelper.ThreadStart()
InnerException:
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货