Board index » delphi » Out of System resources error.

Out of System resources error.

I have an application developed in Delphi 3 and it connects to MS SQL 6.5
server. This application is used for data entry and it includes more than
one form. It works fine on Windows NT 4.0. But when running it on Windows
95 and I try to open more than one form it gives me an error "Out of system
resources" then it hangs. Does any one know if there is a special DLL
needed for Windows 95 to run Delphi3? The BDE that I am using is version
4.0. I appreciate any help in this matter.

The Windows 95 workstation is a P100 with 32M.

 

Re:Out of System resources error.


In article <01bd3b01$8ee28d60$2c0203ac@det64>,
  "Ghada Sidhom" <Ghada.Sid...@jdpower.com> wrote:

Quote

> I have an application developed in Delphi 3 and it connects to MS SQL 6.5
> server. This application is used for data entry and it includes more than
> one form. It works fine on Windows NT 4.0. But when running it on Windows
> 95 and I try to open more than one form it gives me an error "Out of system
> resources" then it hangs. Does any one know if there is a special DLL
> needed for Windows 95 to run Delphi3? The BDE that I am using is version
> 4.0. I appreciate any help in this matter.

> The Windows 95 workstation is a P100 with 32M.

In Windows, everything is considered a window, whether it be a button, form,
label, etc..  Each window needs a handle.  So, if you have too many windows
created at once you can easily run out of resources on Win95.

In Delphi, by default, when you create a new form it adds the form to the
list of forms automatically created when the program starts up.  If you added
20 forms to your project, by default, all 20 forms are created at startup.
They may not be visible, but they are created, and using Windows resources.

I would suggest going to the Project menu, under Options.  There, click on
the Forms tab.  Remove all but your main forms from the auto-create list.  If
you want to later show another form (like a modal dialog), do the following:

Form1 := TForm1.Create(Self);
try
    Form1.ShowModal;
finally
    Form1.Free;
end;

Hope this helps :-)

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading

Other Threads