Results 1 to 14 of 14

Thread: System Resources

  1. #1
    RichH
    Guest

    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

  2. #2
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Are you maintaining lots of different objects when they open up a tab or something ?
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  3. #3
    RichH
    Guest
    most data is stored in text boxes and labels. have attached some screen shots
    Attached Files Attached Files

  4. #4
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Very cool looking app you got there.
    Anyway, from whence are you pulling the data ?
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  5. #5
    RichH
    Guest
    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

  6. #6
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    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 ?
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  7. #7
    RichH
    Guest
    Generally the files are text which are opened randomly. This data is read into a type statement

  8. #8
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    An array of UDTs you mean ?
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  9. #9
    RichH
    Guest
    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

  10. #10
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    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
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  11. #11
    RichH
    Guest
    colleague tried crashed first time couldn't make it crash again

  12. #12
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Do he/she remember where it crashed ?
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  13. #13
    RichH
    Guest
    No where specific. Open app opened client(similar to app) coversheets clicked on vacancy button crashed

  14. #14
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    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.
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width