Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 204
  • Last Modified:

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.
0
StoneCutter3
Asked:
StoneCutter3
2 Solutions
 
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
 
jimswebCommented:
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
 
Mike TomlinsonMiddle 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now