General discussion

Locked

VB6 Project/Size Limits?

By Still In VB6 ·
Hi,

I know the limits for the number of controls on a form.
But what are the other limits for a VB 6 app?
Are there limits for total lines of code?
Limits for total number of variables, classes, forms, ect?
How about EXE size?

The company I work for has a *huge* vb6 app and wonders if we are nearing the limits. So far neither the developers or clients have experienced any specific problems -- but we are trying to be pro-active.

Any info?

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by Dr Dij In reply to VB6 Project/Size Limits?

regardless of limits, huge progs cause readability problems and slow down loading, compiling, etc.

Can't you modularize portions? makes it incredibly readable.

I had a huge prog I modularized.
went from spagetti code to just a few lines:

calls to
getinput
calculate
storecalcs
outputresults

and all the complexity was put in the subroutines

Collapse -

by Dragon Emperor In reply to VB6 Project/Size Limits?

32000 identified per project
Variable names must be 255 chars or less. Form/Control/Module/Class names must be 40 chars or less
Only 254 control names per form (control arrays count for 1). Control array indexes from 0 to 32767
Only 25 levels of nested controls
ListBox/ComboBox limited to 32K items (1K per item)
Std TextBox limited to 64K
Labels limited to 1K
Menus limited to 235 chars
Control names limited to 40 chars
Control Property names limited to 30 chars
A line of code can only be 1024 bytes
A std module is limited to 65534 lines
Up to 256 blank spaces can precede the text on a line
You may only use 24 line continuation characters for a logical line.
Each procedure may be up to 64k of code.
VB uses tables to store the names of identifiers (variables, procedures, constants, and so on) in your code. Each table is limited to 64K.
Roughly 1,500 DLL entry point declarations allowed per module/form.
32K case-sensitive unique identifiers per project.
Every reference to an identifier in a different module creates an entry in the Import Table. Each such entry is a minimum of 24 bytes and is restricted to 64K, resulting in roughly 2,000 references per module.
The Module-Entries table accepts up to 125 bytes per module, with a total limit of 64K, resulting in about 400 modules per project.
The data segment (data defined in the Declarations section) of a form or module is limited to 64K. This contains: static local variables, module level variables (except arrays and variable length strings), 4 bytes for each module level array and variable length string.
UDTs cannot excede 64K (variable length strings only count for 4 bytes).
Total stack size is 1MB per thread (but may grow beyond this is there is adjacent free memory).
More information can be found at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcn7/html/vbconVisualBasicLimitations.asp

Back to Web Development Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums