Click here to Skip to main content
16,011,923 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have created some static instances of forms i have. On back button click event am calling currentFormObj.Close(); followed by formObj.ShowDialog();. Am getting an exception that "Value does not fall within the expected range." But when i use formObj.Show(); the form is getting shown but am unable to access the controls on the form. Can you please help on this?

Thank You
Yashwanth
Posted
Updated 8-Sep-11 20:53pm
v2

1 solution

Not seen that error message before - but you need more information. In VS go to "Debug" on the menu, and select "Exceptions". Put a tick in every box, and press OK.
You will now get an exception whenever it is thrown - whether it is handled or not. Run your code through the debugger, and hopefully, you should get a better idea of exactly what code is throwing the low level exception, and why. Also look at the InnerException property - it may be relevant.
 
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