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

More than likely you're going to have to post the code that's causing those errors. Those errors can be caused from any number of things, and narrowing it down without seeing how you're accomplishing something is near impossible.

First problem is using


does not clear the error, it just keeps executing the next line of code after the error, which means if the first error is bad enough it will cascade throughout the rest of the forms. If I'm reading your text right it is the 19 form that first fails, look for something simple in your code that you missed like a typo or assigning wrong type of value to a declared variable. If you don't see anything then like PsychoCoder said you will have to paste your code up here for us to look at.


Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.