Solved

out of memory

Posted on 2014-03-25
2
184 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

628 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