Run Time Error 7 Out of memory

I have an app that used to run fine, until I decided to add a Wang Image object.

Now, the app will not run on some machines. I get a Run Time Error 7, Out of Memory.

The suspect machines are generally laptops running win 95, and have 32 meg of memory.

The program runs fine on machines with 64 Meg and up. They were win 98 and WIN NT machines, does that make a difference?

I'm using VB5, and the form that bombs is 136K. Is that too big?

Help.
LVL 2
MoMarviAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

amebaCommented:
On Win95 there is a limited User and GDI memory. Adding more memory to machine doesn't help.
NT does not have these limitations.

Use any memory monitor to watch User and GDI resources, e.g. in VB, select menu Help, About, SystemInfo.
0
mcriderCommented:
This is directly from the help pages on Error 7:


More memory was required than is available, or a 64K segment boundary was encountered. This error has the following causes and solutions:

*      You have too many applications, documents, or source files open.

Close any unnecessary applications, documents, or source files that are open.

*      You have a module or procedure that's too large.

Break large modules or procedures into smaller ones. This doesn't save memory, but it can prevent hitting 64K segment boundaries.

*      You are running Microsoft Windows in standard mode.

Restart Microsoft Windows in enhanced mode.

*      You are running Microsoft Windows in enhanced mode, but have run out of virtual memory.

Increase virtual memory by freeing some disk space, or at least ensure that some space is available.

*      You have terminate-and-stay-resident programs running.

Eliminate terminate-and-stay-resident programs.

*      You have many device drivers loaded.

Eliminate unnecessary device drivers.

*      You have run out of space for Public variables.

Reduce the number of Public variables.



Cheers!
0
SicilianCommented:
Hi there
   I've gotten this error numerous times when designing apps and there were a couple solutions.
   1) Applications being run of a network drive or floppy
   2) Working with the ADO recordset and not updating properly
   3) Some strange problem with the generated frx files. After deleting all the frx files, the app was fine. This was a pain because I lost all my images but it did solve the problem.

Sicilian
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

MoMarviAuthor Commented:
mcrider

Stoopid question. but how do I get the user to run in enhanced mode?
0
mcriderCommented:
Enhanced Mode is for Windows for Workgroups implementations... basically when you start windows, you use the command:

   WIN /3


Cheers!
0
mcriderCommented:
It's also for Windows 3.11 with the 32-bit extensions added.


Cheers!
0
MoMarviAuthor Commented:
My users are having the problem in Win95. What do I do then? Do I break the form into two?
0
MoMarviAuthor Commented:
My users are having the problem in Win95. What do I do then? Do I break the form into two?
0
mcriderCommented:
Yea, you could try breaking up the form into two... Are you using alot of Public variables?

Most likely, you are hitting the 64K Segment problem... If so, spliting the form may work unless you have an unusually big procedure... then you need to split up the procedure...


Cheers!
0
MoMarviAuthor Commented:
Sorry mcrider

I found the problem, and still need an answer.

If I compile my app in Win95, I don't get the out of memory error. If I compile in Win98, (my present development machine), Win95 users of the app get the error.

Apparently, the imgedit.ocx has changed between win95 and win98. The out of memory error is a red herring.

What can I do? I can't continue to develop in win98 and compile in win 95. (Telling my users to upgrade to win 98 isn't an option.)

I've upped the points to 200. to reflect the difficulty.
0
MoMarviAuthor Commented:
Adjusted points to 200
0
mcriderCommented:
How about this...

Put two builds together. One including the imgedit.ocx from Win95 and one including the imgedit.ocx from Win98...

You still should be able to develop with 98 and just distribute the correct ocx... Make sense?


Cheers!
0
MoMarviAuthor Commented:
The problem with the imgedit.ocx, is that you don't distribute it. It comes with windows, and is not distributable or registerable.

The Kodak site indicates that apps developed with imgedit in WinNT will not work in win95, though apps built in win95 will work in both 95, and NT. Win98 is not mentioned. Is Win98 closer to NT than 95?

Of course, a pointer to a (preferably free, I'm a cheap b&$t&rd) similar control would help as well.

btw mcrider, I hope you got out at some time today! You were at your machine @ 03:45 PST, and now at 15:47 PST.

It was a nice day here on the east coast.
0
MoMarviAuthor Commented:
The problem with the imgedit.ocx, is that you don't distribute it. It comes with windows, and is not distributable or registerable.

The Kodak site indicates that apps developed with imgedit in WinNT will not work in win95, though apps built in win95 will work in both 95, and NT. Win98 is not mentioned. Is Win98 closer to NT than 95?

Of course, a pointer to a (preferably free, I'm a cheap b&$t&rd) similar control would help as well.

btw mcrider, I hope you got out at some time today! You were at your machine @ 03:45 PST, and now at 15:47 PST.

It was a nice day here on the east coast.
0
mcriderCommented:
I think you answered your own question awhile back... when you compiled in 95 everything worked on both platforms and when you compiled on 98 it only worked on 98...

Do me a favor and look at your SETUP.LST that gets built for distribution and see if imgedit.ocx is in that file... If it is, you are distributing it...

btw, I never go out and I have terminal insomnia...

Cheers!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MoMarviAuthor Commented:
imgedit.ocx is NOT distributed. (sorry for yelling). It's not in my setup.lst file (I actually have to remove it from the setup wixard) It's part of the Wang/Kodak setup in the Win95/98/NT package.

terminal insomnia... back in my day, we called em terminals, now they call em monitors.....

0
InteqamCommented:
i had the same problem when i used a progress bar and make the property RightToLeft true , when i make it false it was solved , i think it MS bug.

No try to use another alternative of that control, or try to change some properties that may cause this error.


the strange thing is that it works on some machines , and on some other machines don't.

0
MoMarviAuthor Commented:
I can't delete the question. The answer lies in that I can't distribute the imgedit.ocx. The "Out of Memory" error is a Red Herring.

For those searching the Database, you have to compile the program in Win95 for any project that uses the Wang/Kodak image control. Compiling in Win98 will cuase problems. Enjoy the points mcrider! Sorry about the average score.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.