Results 1 to 2 of 2

Thread: memory errors with user controls

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2001
    Location
    UK
    Posts
    16

    memory errors with user controls

    Does anyone know of any problems with using nested user controls in VB

    I have written an app that creates a type of grid control from an array of user controls and use it on the main form of my app, however it seems to crash on a regular basis when i load about 50+ rows into the grid control

    Anybody have any ideas
    VB6 Enterprise Edition SP4
    All Windows Operating Systems
    SQL, ADO, ASP

  2. #2
    jim mcnamara
    Guest
    If this is a VB app and ActiveX control, you've got a resource problem. You're requiring more memory than the the virtual system can have resident.

    [badnews]

    c-style cast (This is a general statement) VB uses a lot of memory to create one usercontrol, copies use less.

    50+ controls plus a container control could easily use 75 meg. Windows 98 takes 32 meg - other versions at least the same. So, unless the system running this has 128+ MB of memory, the control cannot exist, because at least part of it will be in the page file. For any control to work, all of it's components have to be memory-resident.

    [/badnews]

    You can find free/inexpensive grid controls at places like www.planetsourecode.com. You can also have the textbox component of the grid as a separate COM object, written in C++.
    That will drop it's memory cost by a factor of five.

    Goto www.codeguru.com and look for edit box control samples.

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