Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Too many complex controls on a form for the IDE ?

Status
Not open for further replies.

boggg1

Programmer
Oct 17, 2002
102
0
0
EU
I have a form with many controls on it including two control arrays. I have recently added a user control which gives me the functionality I want in a special button.

The program works fine with just two copies of the user control on the form but when I add a third user control the IDE itself crashes without warning when I try to run the program within the IDE. The actual cause is that the system no longer recognises the index in either control array, it thinks the arrayed components should not be an array. So adding a user control damages the control array workings. If I remove the third user control the problem disappears, if I add it then the problem returns.

Interestingly, if I compile the program it runs happily in its .exe form with any number of user controls. Also I can add standard controls (ie non user controls) without the problem appearing.

It seems I am reaching some limit in the number and complexity of controls I can have to run the form in the IDE (but not compiled). Please don't tell me to redesign my interface - my users like the way it works and I have even won awards for it. It was built for Engineers and they like it complicated as it does lots of things !

Any ideas or hints as to what is happening here ?

Boggg1
[bigglasses]
 
I wonder it it's something with User Control.
Have you checked if it shows same behavior if you start new project, and put control array on a form?
If it indeed user control issue it could be connected with subclassing gone wrong (hwnd, wndproc and all this stuff).
Just my 2 cents.
 
Thanks. Just the mention of subclassing makes my knees go week. But your reply did make me think that maybe something got corrupted, perhaps during the time I was debugging the user control and it was not working. I took everything apart as much as I could, and reconstructed it all again - it now works in the IDE as well. Why this corruption would affect the IDE and not the compiled version is beyond me but at least I now know that I have not hit an upper limit in the IDE.

Thanks again.

Boggg1
[bigglasses]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top