Home All Groups Group Topic Archive Search About

Control Array element doesn't exist, Which one?

Author
21 Dec 2006 4:21 AM
kaynos@kaynos.com
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? 


--
--------------------------------- --- -- -
Posted with NewsLeecher v3.8 Beta 6
Web @ http://www.newsleecher.com/?usenet
------------------- ----- ---- -- -

Author
21 Dec 2006 5:20 AM
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

Show quoteHide quote
"Kaynos" <kay***@kaynos.com> schreef in bericht
news:sZnih.42573$3n1.40465@fe64.usenetserver.com...
>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?
>
>
> --
> --------------------------------- --- -- -
> Posted with NewsLeecher v3.8 Beta 6
> Web @ http://www.newsleecher.com/?usenet
> ------------------- ----- ---- -- -
>
>
Author
21 Dec 2006 6:17 AM
kaynos@kaynos.com
Thanks for that quick reply.. Didn't realize I could control
debugging by removing directives..  Worked like a charm..




--
--------------------------------- --- -- -
Posted with NewsLeecher v3.8 Beta 6
Web @ http://www.newsleecher.com/?usenet
------------------- ----- ---- -- -