-
System Resources
We have a vb application that has numerous forms. Customer, Supplier could be an example of two that may be open at the same time. Each of these forms may have upto 8 tabs on them which stores other data about the particular customer/supplier. An example could be addresses, contacts, documents,history.....
The problem is that the system resources get reduced drastically when I have 2 of these open. It has gotten so bad at times that we get error 7 out of memory. I installed a memory manager and it says I'm using 50% of cpu and 50% memory so why have I run out of resources. Any ideas. Is there some memory manager I could use to stop this message happening
-
Are you maintaining lots of different objects when they open up a tab or something ?
-
1 Attachment(s)
most data is stored in text boxes and labels. have attached some screen shots
-
Very cool looking app you got there.
Anyway, from whence are you pulling the data ?
-
There are several indexed files behind it. One of these is applicant. One is history. Most of the data is pulled through when the form is loaded. Loading the applicant sheet you can see caused a 26% drop in system resources on a 128mb 1ghz win me pc
-
Are you taking the data from a .mdb database, or from your own .txt files or something ?
Also, are you storing everything in dynamic arrays or keeping the entire recordset public+active or what ?
-
Generally the files are text which are opened randomly. This data is read into a type statement
-
An array of UDTs you mean ?
-
Like this
Type AppRecord ' Create user-defined type.
ID As Integer ' Define elements of data type.
Name As String * 20
Address As String * 30
Phone As Long
....
....
....
...
end type
Open "app" For Random As #1 Len = Len(AppRecord)
' Read the sample file using the Get statement.
Position = 3 ' Define record number.
Get #1, Position, AppRecord
-
Yeah an array of UDTs :)
Anyway try running the app from inside the IDE and see if there's anywhere in particular that kills it
-
colleague tried crashed first time couldn't make it crash again
-
Do he/she remember where it crashed ?
-
No where specific. Open app opened client(similar to app) coversheets clicked on vacancy button crashed
-
You could try putting in some debugging, eg. Having the $current$ function or sub name printed out to the immediate window or to a log file.
That way you could see if a particular sub is being called repeatedly when it shouldnt.
You could also try Stepping Into the application. It might be doing something you didnt expect.