Solved

out of memory

Posted on 2014-03-25
2
178 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

762 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now