Control Array element doesn't exist, Which one?

K

kaynos

I am converting a vb6 app to vb.net. I have a form with 100's of
controls in it. When I execute form.show() I immediately get the
following exception error, which occurs on the form.show() statement

An unhandled exception of type 'System.InvalidOperationException'
occurred in project1.exe

Additional information: An error occurred creating the form. See
Exception.InnerException for details. The error is: Control array
element 2 doesn't exist.

What does this mean? Missing control?

The form displays properly in vs2005 designer. I am unable to set a
break point in the program and debug because all breakpoints are
never hit. I need a programatic way of tracing or finding which
control is causing this issue. Can anyone offer assistance?
 
C

Cor Ligthert [MVP]

Kaynos,

Your error is probably in the designer generated code, you can open that
with the plus and temporaly remove the commands that tell not to debug that
part.

Cor
 
K

kaynos

Thanks for that quick reply.. Didn't realize I could control
debugging by removing directives.. Worked like a charm..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top