Solved

out of memory

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
vb.net 2 43
Get Client IP on RDS - VB.NET 15 44
Need help making a program or form for inventory that exports to txt 8 39
No Data for DropDown List 2 22
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
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…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

815 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

15 Experts available now in Live!

Get 1:1 Help Now