Click here to Skip to main content
11,806,575 members (39,660 online)
Rate this: bad
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
Edited 2-Apr-13 1:49am
Richard MacCutchan at 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 at 2-Apr-13 7:47am
there is no code.
Dave Kreskowiak at 2-Apr-13 7:49am
I'm not downloading ANYTHING from that site.

1 solution

Rate this: bad
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??
Rixterz123 at 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 at 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 at 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 at 2-Apr-13 10:23am
That would throw an exception alright. Glad you found it.
Rixterz123 at 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
0 ppolymorphe 295
1 OriginalGriff 150
2 George Jonsson 135
3 Richard Deeming 120
4 CPallini 100
0 OriginalGriff 3,380
1 Maciej Los 1,990
2 CPallini 1,915
3 KrunalRohit 1,907
4 ppolymorphe 1,317

Advertise | Privacy | Mobile
Web03 | 2.8.151002.1 | Last Updated 2 Apr 2013
Copyright © CodeProject, 1999-2015
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