Vb.net程序显示错误 [英] Vb.net program shows error

查看:86
本文介绍了Vb.net程序显示错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了一个严重的问题.尽管我新制作了程序,但显示错误.我只对第一种形式使用了1280,1024动画,然后对每种形式都使用了1280,1024图像.今天,我正在检查,然后显示了第19号和第9号错误消息.第20个表格.如果我使用

I got a serious problem. Though I have made my program newly it shows error. I have used 1280,1024 animation only for first form then used 1280,1024 image for every form. Today I was checking then it was showing me error message for 19th & 20th form. If I use

On Error Resume Next


然后它显示另一种形式的错误;如果我在菜单项中使用相同的代码,则我的意思是这样,当我单击以显示一个表格,该表格显示另一个错误时,我可以摆脱错误.第一条错误消息是

未处理InvalidOperationException.创建表单时发生错误.有关详细信息,请参见Exception.InnerException.错误是参数无效."

第二个错误是

未处理OutofMemoryException
引发了类型为"System.OutOfMemoryException"的异常."


我注意到,对于那些标签和文本框很少的表格,它不显示错误消息.对于那些具有1个菜单栏,2个图片框(一个是1280,1024&另一个是250,456),2个组框,40个标签,3个组合框,38个文本框和这些格式的表格,它显示错误消息.三个按钮.请帮助我,我需要摆脱这个问题.这是否意味着我不能在表单中使用无限控件?这是否意味着我不能在项目中使用多达19个表单?我的程序中有28个表格.请帮我,我疯了!




then it shows error for another form ; if I use same code there in the menu item I mean so that I can get rid of error when I click to show a form it shows another error. First error message is

"InvalidOperationException was unhandled. An error occurred creating the form. See Exception.InnerException for details. The error is parameter is not valid."

and second error is

"OutofMemoryException was unhandled
Exception of type ''System.OutOfMemoryException'' was thrown".


I have noticed it that it doesnt show error message for those form which have few labels and text boxes. It shows error message for those forms which have 1 menu bar, 2 picture boxes(one is 1280,1024 & another is 250,456), 2 group boxes, 40 labels, 3 combo boxes, 38 text boxes & three buttons. Please help me I need to get rid of this problem. Does it mean that I cant use unlimited control there in my form? Does it mean I cant use up to 19 forms there in my project? I have 28 forms there in my program. Please help me I am being crazy!!



推荐答案

我建​​议任何新创建的应用程序都需要28种形式可能需要重新设计.

您可以使用UserControls而不是表单来将它们加载到位.您有一个背景图像控件,可以将其更新为所需的新图像,而无需创建新表单.

您遇到的错误可能与操作系统有关.给定内存限制或操作系统版本,您可能会达到窗口数限制.

干杯.
I would suggest that any application - newly created - that requires 28 forms might need a rethink on design.

Rather than forms, you would use UserControls and load them in place. You have a background image control that could just be updated to the new image you like, without having to create new forms.

The error you have might be related to the operating system. Given memory constraints or the version of your OS you might be hitting window count limits.

Cheers.


这篇关于Vb.net程序显示错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆