Click here to Skip to main content
15,884,176 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hey once again

I recently put an image in a picturebox, and when i went to change it, there were loads of crosses in red (X) where some of the buttons on the popup were. I also got a message saying:

"Error invoking 'Choose Image...' Details: A generic error occurred in GDI+"

Has anyone had this before?

I can't continue with my project until it's fixed :C

So you can see for yourself, i posted the screenshot here[^]
Posted
Updated 2-Apr-13 1:49am
v2
Comments
Richard MacCutchan 2-Apr-13 7:46am    
Your link goes to a download, not a screenshot. Try showing some of the code that has the problem.
[no name] 2-Apr-13 7:47am    
there is no code.
Dave Kreskowiak 2-Apr-13 7:49am    
I'm not downloading ANYTHING from that site.

1 solution

Chances are that you're doing something in your code that is leaking handles. Are you Disposing any drawing objects properly?? Graphics objects? Brushes? Pens? Are you taking forever to do any custom drawing??
 
Share this answer
 
Comments
[no name] 2-Apr-13 7:53am    
i am just doing the designer. and you don't have to download anything... it's a preview, although the URL says otherwise.
Dave Kreskowiak 2-Apr-13 8:13am    
Well, the big red X means an exception was thrown by that control or you took forever to supply the data needed to draw it.

Another possibility is your system is leaking handles somewhere, either in your code or somewhere else in Windows. Open Task Manger and switch to the Processes tab, then click the View menu, Select Columms and enable Handles. Sort the display by the Handles column and see if there is anything that has an excessive number of handles open, say above 10,000. If so, that process probably has a leak problem and should either be updated or removed.
[no name] 2-Apr-13 8:45am    
Thank you very much for your help.
The problem was that one of the resource images i had contained a dot (.), which caused a name error

Silly old resources!
Dave Kreskowiak 2-Apr-13 10:23am    
That would throw an exception alright. Glad you found it.
[no name] 3-Apr-13 7:44am    
How do you mark a question as solved?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900