每当我们关闭我们的应用程序时,都会出现一个未处理的异常,但它没有详细说明它的根本原因:
{System.InvalidOperationException: Invoke or BeginInvoke cannot be called on a control until the window handle has been created.
at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
at System.Windows.Forms.Control.BeginInvoke(Delegate method, Object[] args)
at System.Windows.Forms.WindowsFormsSynchronizationContext.Post(SendOrPostCallback d, Object state)
at System.Windows.Forms.AxHost.ConnectionPointCookie.Finalize()}
我在代码中没有看到我们调用BeginInvoke的地方。
我们正在调用Invoke,但仅限于InvokeRequired = True。
有没有人见过这个?