Results 1 to 10 of 10

Thread: Limit of MDI Child forms on MDI

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2002
    Location
    Houston
    Posts
    9

    Limit of MDI Child forms on MDI

    I have an application that uses an MDI form.

    I have run into a problem where I am receiving an error message when I have 10 - 12 child forms open (the error message actually points to a usercontrol causing the problem, but I have exhausted my testing on the control and have not stumbled on a problem with the control). Most of the time my users will not have this many windows open, but I would like to know if there is a limit so I can account for that fact.

    Any help is appreciated.

    R De Leon

  2. #2
    Hyperactive Member
    Join Date
    May 2003
    Posts
    401

    Re: Limit of MDI Child forms on MDI

    Originally posted by rhdeleon
    I have an application that uses an MDI form.

    I have run into a problem where I am receiving an error message when I have 10 - 12 child forms open (the error message actually points to a usercontrol causing the problem, but I have exhausted my testing on the control and have not stumbled on a problem with the control). Most of the time my users will not have this many windows open, but I would like to know if there is a limit so I can account for that fact.

    Any help is appreciated.

    R De Leon
    AS far As I know there is no limit for how many child forms to be open.
    Enjoy!!!
    apps_tech

  3. #3
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    I just ran a test and got up to about 550 before I got bored. I'd say it is limited only by available memory.
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  4. #4

  5. #5
    Frenzied Member Buzby's Avatar
    Join Date
    Jan 1999
    Location
    UK
    Posts
    1,670
    Was the error "Out of Memory" (7 - I think) ?
    If it is then you have found the limit of MDI forms you can have. The limit is based on the amount of memory available to your machine. Some simple forms can be opened hundreds of times, more complicated forms can only be opened a few times.
    My advice is put code in to catch the "Out of Memory" error and pop up a message along the lines of "There are not enough resources to display this window - please close any unused windows and try again."
    'Buzby'
    Visual Basic Developer
    "I'm moving to Theory. Everything works there."

  6. #6

  7. #7

    Thread Starter
    New Member
    Join Date
    Oct 2002
    Location
    Houston
    Posts
    9
    Thanks for all your comments.

    The user control is a modified combo box that does a few simple tasks such as displaying a different icon based on the combo value to alert the user for various reasons.

    I did more testing and came to a similar conclusion that I am using up all the available memory and since most of the controls are user controls, the error message is thrown up regarding the user control, rather than out of memory.

  8. #8

    Thread Starter
    New Member
    Join Date
    Oct 2002
    Location
    Houston
    Posts
    9
    More testing:

    I retract my previous statement and now think it is a limit based on the number of controls or something other than available memory.

    In this same application I have several other forms.

    One form has only 1 custom control and 27 other controls. I was able to open it 31 times before receiving an error that stated that a control could not be set. Task Manager told me that I had plenty of memory available, so it wasn't a memory problem.

    Hmmmm....

    Any other ideas or comments is appreciated.

    Rene'

  9. #9
    Super Moderator Wokawidget's Avatar
    Join Date
    Nov 2001
    Location
    Headingly Occupation: Classified
    Posts
    9,632
    My car won't start, what's wrong with it?

    Bit of a difficult question is answer really isn't it...

    Post the code for your usercontrol and we'll have a look. Without the code we cannot help you...

    Woka

  10. #10

    Thread Starter
    New Member
    Join Date
    Oct 2002
    Location
    Houston
    Posts
    9
    Here is the code for the user control.

    I did not code the user control and will readily admit that I have not had the time to understand everything it does.

    Rene'
    Attached Files Attached Files

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