Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 898949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:08:05+00:00 2026-05-15T15:08:05+00:00

I hope someone may be able to help! We have a pretty large VB.Net

  • 0

I hope someone may be able to help!

We have a pretty large VB.Net MDI application that has been converted from VB6. When it is first run up with no MDIChild forms opened it uses about 35,000K. As more and more forms are opened (but not closed) the memory usage (according to Task Manager) creeps up at approximately 4,000K per form. (I am aware that T.M. only shows allocated memory for the application, and not the actual memory used.)

The issue is that when the allocated memory reaches a certain point, which is different depending upon what the available memory is on the target machine, no more forms can be opened until one or more of the open forms are closed. The “limit” of the ammount of forms that can be opened seems to depend upon the available memory of the machine.

For example:
– On a virtual machine with only 512M for the whole machine it appears to be about 7-8 forms and the allocated memory is around 80,000K when this happens.
– On our terminal server machine which has 3GB and is also running various other thirsty applications it stops at around 20+ forms and a memory allocation of about 100,000 – 105,000K.

I have tried using perfmon to see if there is a leak and that is indicating steady usage.

However, even if I close the forms the allocated memory only drops by about 3000K for the first form closed and then 100K for each form closed after. If I then add a few more forms the memeory increases, and if I then close some the same -3000K, -100K meomry reduction pattern happens again.

Has any one come accross this before? Can any one please help as this is looking like a bit of a show stopper! I look forward to your replies.

Incidentally the original VB6 version does not have this issue and also will return it’s memory allocation to that it started with if you close each form rather than the allocation gradually creeping up because teh app releases less than it is allocated.

EDIT: I have just managed to get the same error while in dev. It appears that a WIN32Exception is being thrown in a UserControl. The error is “Error creating window handle.”

Thanks and kind regards,
Duane.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T15:08:06+00:00Added an answer on May 15, 2026 at 3:08 pm

    Your app is simply consuming the quota of handles that Windows imposes. By default it is 10,000 handles, trying to create another window will fail with “Error creating window handle”.

    Maybe those limits are lower for a VM or TS install, not sure. The upper limit is rather enormous and you should never have any trouble staying far away from it. In Task Manager, use View + Select Columns and tick USER objects, GDI object and Handles. Any of these columns growing without bound is a sure sign of a bug in your code, like not disposing forms or controls. Consuming more memory is a side-effect of this leak.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hope someone can help me on this as been stuck for hours. I am
I hope someone can help me since I have no clue whats going on
I hope someone could help me on this. I want to add a month
This really, really urks me, so I hope that someone can give me a
Really hope someone can point me in the right direction as I have no
I hope someone in here can help me out because I am a bit
I hope someone can guide me as I'm stuck... I need to write an
The docs at www.fastcgi.com aren't clear on this (to me), so I hope someone
I hope this question does not come off as broad as it may seem
For the project I'm working on, we have a desktop program that contacts an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.