Click here to Skip to main content
12,403,812 members (72,382 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: VB GDI+ VB.NET
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 2-Apr-13 1:27am
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.
Rixterz123 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

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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??
  Permalink  
Comments
Rixterz123 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.
Rixterz123 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.
Rixterz123 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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160721.1 | Last Updated 2 Apr 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100