Solved

out of memory

Posted on 2014-03-25
2
182 Views
Last Modified: 2014-03-31
I've the following error:

System.OutOfMemoryException: Memoria insuficiente.
   en System.Drawing.Graphics.CheckErrorStatus(Int32 status) (see attached file)

It occurs when the user clicks a button continuously and fast (the button is disabled at first click) and show the next form. It seems that the error is triggered when the form is loading the background image.

How can I fix that? Need more info?

thanks in advance,
Leonel
dump.txt
0
Comment
Question by:leorocha
2 Comments
 
LVL 22

Accepted Solution

by:
Ivo Stoykov earned 500 total points
ID: 39955362
there is a bug in GDI+ and there is a workaround

image = image.GetThumbnailImage(image.Width, image.Height, null, IntPtr.Zero);

Open in new window

look here
HTH

Ivo Stoykov
0
 

Author Comment

by:leorocha
ID: 39955837
Thanks for your response Ivo. I've seen this WA. At this moment, the background picture is defined in the form property BACKGROUNDIMAGE in the VS IDE. Do you mean I use Form.BackgroundImage=myimage.GetThumbnailImage(myimage.Width, myimage.Height, null, IntPtr.Zero) in FORM LOAD EVENT instead?
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question