Click here to Skip to main content
16,011,949 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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

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!!



Posted
Updated 18-Aug-10 5:35am
v2
Comments
Dalek Dave 18-Aug-10 11:35am    
Edited for Presentation.
Richard MacCutchan 18-Aug-10 11:37am    
ditto, I hope I didn't mess up what DD did.

1 solution

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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900