I think it is more dependant on the VB's or the VB form object's allowed memory. I am not sure what the limit is but there is a limit. It may also depend on what type of controls you are using. I experimented once with labels and textboxes and I think I had around 700 controls on a form before I got an 'out of memory' error.
You may want to double check with microsoft's msdn to be sure. Hopefully someone will correct me if I am wrong. Thanks and Good Luck!
The maximum number of controls allowed on a single form depends on the type of controls used and available system resources. However, there is a fixed limit of 254 control names per form. A control array counts only once toward this limit because all the controls in the array share a single control name.
The limit on control array indexes is 0 to 32,767 on all versions.
If you layer controls on top of each other, such as using several frame controls within other frames, Visual Basic will generally accept no more than 25 levels of nested controls.
Each nongraphical control (all the controls except shape, line, image, and label) uses a window. Each window uses system resources, limiting the total number of windows that can exist at one time. The exact limit depends on the available system resources and the type of controls used.
To reduce consumption of system resources, use the shape, line, label, and image controls instead of picture box controls to create or display graphics.
Some limitations on Visual Basic, and the applications you create with it, are imposed by Microsoft Windows. These limitations may change when you install a different version of Microsoft Windows
Every open window uses some system resources (data areas used by Microsoft Windows). If you run out of system resources, the run-time error "Windows is running low on available resources" occurs. You can check the percentage of system resources remaining by choosing About in the Windows Explorer Help menu in Windows 95/98 and Windows NT 4.0 or later. Applications can also call the Windows API GetFreeSystemResources to reclaim system resources, close windows (such as open forms and Code windows, as well as windows in other applications), and exit running applications.
A single project can contain up to 32,000 "identifiers" (any nonreserved keyword), which include, but are not limited to, forms, controls, modules, variables, constants, procedures, functions, and objects. Note that the actual number of identifiers is limited to available memory.
Variable names in Visual Basic can be no longer than 255 characters, and the names of forms, controls, modules, and classes cannot be longer than 40 characters. Visual Basic imposes no limit on the actual number of distinct objects in a project.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.