System.ComponentModel.Win32Exception (0x80004005): 创建窗口句柄时出错。
在 System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)
在 System.Windows.Forms.Control.CreateHandle()
在 System.Windows.Forms.TextBoxBase.CreateHandle()
在 System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
在 System.Windows.Forms.Control.CreateControl()
在 System.Windows.Forms.Control.SetVisibleCore(Boolean value)
在 Microsoft.Reporting.WinForms.WinRSviewer.ShowMessage(String text, Boolean enabled)
在 Microsoft.Reporting.WinForms.ReportViewer.UpdateUIState(Exception e)
在 Microsoft.Reporting.WinForms.ReportViewer.OnRenderingComplete(Object sender, AsyncCompletedEventArgs args)
在 Microsoft.Reporting.WinForms.AsyncReportOperation.EndAsyncExecution(Exception e)
在 Microsoft.Reporting.WinForms.ReportViewer.<>c__DisplayClass1.<OnBackgroundThreadCompleted>b__0()
在 Microsoft.Reporting.WinForms.ReportViewer.ProcessAsyncInvokes()
在 Microsoft.Reporting.WinForms.ReportViewer.Dispose(Boolean disposing)
在 System.ComponentModel.Component.Dispose()
在 SyncMyProductSend.AppDomainTest.LoadData(DataTable rs1, DataTable rs2, DataTable rs3, DataTable ds4, String BrandCode, String productcode, String imgUrl)
在 SyncMyProductSend.AppDomainTest.LoadData(DataTable rs1, DataTable rs2, DataTable rs3, DataTable ds4, String BrandCode, String productcode, String imgUrl)
在 SyncMyProductSend.Program.CreateExportFile()
在 SyncMyProductSend.Program.Run()
在 SyncMyProductSend.Program.Main(String[] args)

直接运行SyncMyProductSend.exe 没有问题,但是在计划任务启动 SyncMyProductSend.exe 报创建窗口句柄时出错。

rdlc .net4.0 用了卸载 Appdomain ,Reporting.WinForms.ReportViewer 还是会报错失败。

解决方案:待定。

https://www.cnblogs.com/panjinzhao/p/11401144.html

转载于:https://www.cnblogs.com/panjinzhao/p/11401144.html

System.ComponentModel.Win32Exception (0x80004005): 创建窗口句柄时出错。 在 System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp) 在 System.Windows.Forms.Control.CreateHandle() 在 System.Wind...
Winform窗体 win32 Exception :“ 创建 窗口 句柄 出错 ” 类似如上图中的 win32 创建 窗口 句柄 出错 ,根据实际解决问题的推测,是我们的GC自动回收机制出现了问题,有些是第三方控件本身的具有的问题,有些是控件的生成多次重复使用导致的。 一般解决方案,为在抛出异常的第三方控件或winform自身控件或者自定义控件使用完毕后,手动调用控件的 Dispose ()方法,主动释放即可。 关于释放...
场景:在 窗口 中有个TabControl,左侧有TreeView 选择TreeView中结点,Tabcontrol.Tabpages.Clear(); 然后新增tabpages 问题:每次新增tabpages,会增加300~400个user objects(windows任务管理器中可以查看)。直到windows上限10000个。会弹出如题所示错误: Win32 Exception 创建 窗口 句柄
今天用MDI窗体,在一个子窗体A中,通过主窗体的下拉菜单调用另外一个子窗体B,出现错误“ 创建 窗口 句柄 出错 ”,原因不清楚;似乎与该子窗体A用了DotNetBar控件的DataGridViewX控件有关,我换成C#自带的DataGridView控件,就没在出现该问题。 有意思的地方在于:如果DataGridViewX控件里边没有数据,则不会出现问题;如果有数据,则出现。而且如果是进入窗体即查询出来...