Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am trying to run my program to test it. Actually I am trying to run second form to see it that its working properly or not. But it shows me error. First time I got this error message "Exception of type 'System.OutOfMemoryException' was thrown" & second time I got this one "An error occurred creating the form. See Exception.InnerException for details. The error is: Parameter is not valid." Please help me & tell me what should I do & why its happening though I didnt make any mistake to write code. By the way my program has 25 forms. Please help me & tell me how should I get rid of this problem? Please help me.
Posted
Comments
E.F. Nijboer 25-Jul-10 13:58pm    
Some event recursion maybe? It's very hard guessing because we cannot see the code and look at what's happening, but an out of memory is most of the time some unwanted recursion... try to follow the initialization with the debugger.
DaveAuld 26-Jul-10 2:15am    
The number of forms should not make a difference, what do you mean you are trying to run second form? do you mean a second instance of the Application?
Khaniya 26-Jul-10 6:02am    
you have to give us your code snip to understand your issue
thanks
Simon_Whale 26-Jul-10 11:08am    
Without seeing any code the only suggestion I could give is to put a break line at the first line of the form_load of new methods of the form and step through them line by line to see where the error occurs
William Winner 26-Jul-10 14:26pm    
Reason for my vote of 1
you have to provide more information than that.

What is the line of code that is throwing the error?

Which parameter is not valid?

1 solution

Just to pile on - if you "didn't make any mistake to write code", you wouldn't be getting an error. You messed something up, you just don't know where it is.
 
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