创建窗口句柄时出错... Windows应用程序,VB.NET,VS 2012 [英] Error Creating Window handle ... Windows Application, VB.NET, VS 2012
问题描述
大家好,请协助
我正在使用VB.NET在vS2012中开发一个非常简单的Windows应用程序;一切都很好,直到昨天晚上,当我试图打开一些表格时,我收到错误消息"错误创建窗口句柄"在下面的代码:
I am developing a very simple Windows application in vS2012 with VB.NET; everything was fine till yesterday evening when I tried to open some forms I get the error message "Error creating window handle" on the code below:
dim frm_Cashbook as new frmCashbook
dim frm_Cashbook as New frmCashbook
frm_Cashbook.Show()
frm_Cashbook.Show()
请帮助我,没有什么工作了。有时表格打开并立即消失,今天一整天都用谷歌搜索,没有找到解决方案。
Please help me, nothing is working anymore..sometimes the forms open and immediately disappear, have googled overnight and whole day today, no solution found.
推荐答案
您好Zabron,
感谢您发布此处。
>>创建窗口句柄时出错
>> Error creating window handle
您的程序似乎有内存泄漏,尝试检测并诊断应用程序的资源消耗。使用
Windows任务管理器来监控资源使用情况。
Your program seems like have memory leaks, try to detect and diagnose the resource consumption of your application over time . Use Windows Task Manager to monitor resource usage over time.
尝试在 frm_Cashbook 找到内存泄漏的地方 strong>",并处置您认为已发布的资源。
Try to find the palce of memory leaks on "frm_Cashbook", and dispose the resource which you think it has been released.
关于WinForm中的内存泄漏,一些建议:
About memory leaks in WinForm, some suggestions for you:
- 如果不再使用该对象,则需要确保该对象已被释放。
- 不要忘记手动释放非托管资源。
- 注意继承IDisposable接口以释放资源。
- 使用Using语句可以避免忘记释放资源。
- 注意取消全球活动的注册。
最好的问候,
Bob
Bob
这篇关于创建窗口句柄时出错... Windows应用程序,VB.NET,VS 2012的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!