By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,234 Members | 1,908 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,234 IT Pros & Developers. It's quick & easy.

How to trap an ExternalException error

P: n/a
How can I trap a System.Runtime.InteropServices.ExternalException error? I am working with graphics and sometimes the graphics are corrupt and I end up getting:

An unhandled exception of type 'System.Runtime.InteropServices.ExcternalException ' occurred in

Additional Information: A generic error occurred in GDI+.
I have a Try..Catch ex as Exception...End Try code wrapping the lines where the Picturebox.Image is set, but it won't catch it. I have included a Thread.GetDomain().UnhandledException handler, but the error pops up first, and THEN executes the unhandledexception handler, which is no good.

I tried to Catch ex as SystemException, or as the externalexception, but cannot find a working solution.

Nov 20 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.