Does anyone know if theres a work-around for this?

cooldudedan
01-24-2008, 09:52 AM
http://poeljames.googlepages.com/limit.JPG

And please dont say "use less controls" ;)

is there a patch or something i can use?

the master
01-24-2008, 09:58 AM
Use control arrays or split your form into 2 forms

ElderKnight
01-24-2008, 11:11 AM
One way to begin is to look at your Labels. If they're not referenced in your code, they can all have a generic name and be a member of a control array, e.g., lblMyLabel(0), lblMyLabel(1), lblMyLabel(2) . . .

Renaming other controls to make them array members is more problematical, as their names will be less meaningful. Of course, controls that are related in some way probably should be grouped in an array.

DougT
01-25-2008, 02:35 AM
[img]
And please dont say "use less controls" ;)
Ok, then; Don't use as many :p

Seriously, if you've exhausted the number of controls on your form then I suspect it must be too busy and a nightmare for the user to use. Have you thought of re-designing the GUI ? (eg using a Grid rather than multple TextBoxes)

What controls and how many of each have you currently got?

the master
01-25-2008, 02:39 AM
What controls and how many of each have you currently got?

A screenshot would help.

I guess youve got 1 form which has some kind of containers (maybe pictureboxes) and each picturebox contains a lot of different controls that should appear at different times. Things like this should be split into seperate forms

Hugh Lerwill
01-25-2008, 04:58 AM
You have run into the limit for the number of Control names, the total number of Controls is not so strictly limited.
Use Control Arrays they only consume one name each.
To save resources if some controls are not always required then use Load to load them when they are and UnLoad to unload them when they are not.

mkaras
01-26-2008, 05:59 AM
We can only guess at what types of controls that you are using and which of the types are used in profusion so as to exceed the VB limits. As such it is next to impossible to make specific recommendations.

If you are using a lot controls such as the Line control one way to cut down is to draw these as graphics on the form instead of placing them at design time as a control.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum