Number of Forms in a Visual Basic Solution

Is there a practical limit to the number of forms that should be built into a Visual Basic project?  In the past I've tried to put too much onto a single form (e.g., Vendor Maintenance, Accounts Payable Input, Accounts Receivable Input) and the editing begins to "bog down".  So I break out each of the three examples above to it's own form.  But I could end up with hundreds of forms by the time I finish this project.  Is that any kind of run-time processing problem or any other kind of problem?  Thanks.
StoneCutter3Asked:
Who is Participating?
 
jimswebConnect With a Mentor Commented:
The MSDN documentation has something like this:

(1) usually, a single project can hold 32k 'identifiers'. That can include  forms, controls, modules, variables, constants, procedures, functions, objects etc. It is obvious that the actual stuffs are only limited to available memory.
(2) VB doesn't have any known restrictions on the actual number of objects that it can ave. However, the variables can't be longer than 255 chars.
(3) The total number of controls allowed in a form usually depend on the category/type of the controls. Available system resource has also a major role in this context.
(4) MSDN says, a form can have maximum of 254 controls!

To speed up things, i think you can follow the unloading technique.


Unload frm1
set frm1 = nothing

This can very well clear out the memory that the form may be holding.

Hope this helps you in one or other way.
0
 
CodeCruiserCommented:
I think all depends on the resources of system available to VS. I am not aware of any limit.

But what is the size of exe going to be if you have hundreds of forms?
0
 
Mike TomlinsonConnect With a Mentor Middle School Assistant TeacherCommented:
@jimsweb...Based on #4 and your code snippet, you must be referring to VB6.  I know VB.Net doesn't have that limitation...  =)
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
jimswebCommented:
Yes you are right. :) i have read it somewhere. So thought of putting it here.
0
 
StoneCutter3Author Commented:
Thanks guys.  Good input.
0
 
CodeCruiserCommented:
So a comment describing VB6 limits answered your question?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.