I came across a somewhat obscure issue that, it seems, really should not be so obscure. I am working on an application that will be used to display rotating videos, a 'ticker' and rotating graphics in lobbies/waiting areas, on the client's hardware. I am using Windows Forms 2.0, DirectX 10 to display the videos, and a simple WinForms PictureBox control to display the graphic images. My intent was that the 1.0 version of the program would no longer use the PictureBox in order to support animated GIFs to be among the graphic items. My prior experience was that simply using a PictureBox.Image property would not properly display an animated GIF, but only show the first frame.
So, I read somewhere that with WinForms 2.0, that was no longer the case. So, I figured I'd try one out before going too far. I put an AniGif in the rotation, and it loads up. I wait the 5-seconds I know this particular GIF has until frame 2 comes up, and, lo and behold, an uncatchable exception:
A generic error occurred in GDI+
Taking a peek at the stack trace from the exception, I find that there are, in fact, WinForms methods being called on my behalf at the appropriate time, trying to display the next frame of the image. But they are not working. "Generic Error" and all. How helpful...
More...