We help IT Professionals succeed at work.

vb6 ide try to add class get out of memory error

peter3244
peter3244 used Ask the Experts™
on
Hi I have tried this on several machines and rebooted several time. I have also ensured that the all patches and (including vb6 ones, sp6) are update to date on the machine.

The problem is this, we have a huge legacy system written in vb6 (i think it was intially written in vb3!).
It has 125 forms, 7 modules, 487 classes, 90 controls !!

We need to add another class to the project.  When we try to do this we get an 'out of memory; error.
If we remove a class, form or a control already in the project then we can add the class we want. But afterwards we cannot add anything  else. It seems we have hit a max limit of forms/classes/controls for one project. We could break the project down into DLLs etc but a) no time b) no budget. Has anyone got a workaround or heard of this before?

Many thanks!

This problem proves size is not everything!  
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2014
Commented:
http://msdn.microsoft.com/en-us/library/aa716295

"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."

Eventually I will produce some code that will convert a VB6 project to VB.Net. But more exactly compile it so you can still develop with VB6. You can now run VB.Net on Linux/Unix/Opensolaris etc. So I though it was about time that you could run VB6.

Back to the question.......

I have hit large project nightmare and this solution may help you. But it depends on your type off application.

I had an MDI form with pull-down menus that launched other forms and MDI child process.  The Application had different types of features like: File Maintenace; Data Entry; Reporting; Etc.

1) I moved some of the forms into another project, for example I created a file maintenance EXE.
2) I deleted the file maintenance forms from the original project.
3) In the pull down menus I created a simple call MyProcess "XYZ" which Shelled to an EXE passing the XYZ to a command line.
4) In the File maintenance Exe Sub Main() which   I just used a simple select case to decide which form to set running.

I only did this for forms that wee seldom used.

Hope this helps:~)





Top Expert 2014

Commented:
@peter3244

What did you find as the cause and what was your work-around?