Animated Gif on my splash screen
-
I'm trying to use a animated GIF file on my splash screen. The GIF is placed inside of a picture box. The picture shows fine but the animation doesn't work. When I use the GIF in any other form the animation works. It just won't work on the splash screen. Any Ideas?
-
I'm trying to use a animated GIF file on my splash screen. The GIF is placed inside of a picture box. The picture shows fine but the animation doesn't work. When I use the GIF in any other form the animation works. It just won't work on the splash screen. Any Ideas?
There could be several things wrong, but you need to be more specific about how you're dealing with your splash screen, since it could be implemented in countless different ways. The important thing is that you always modify a control - like change the
PictureBox.Image
property if that's what you're doing - in the thread on which the control was created. You can do this using theInvokeRequired
property and theInvoke
method, both of which include an example of using them (they're defined by theControl
class and, thus, inheritted by every derivative class). If you're doing this on a timer's event handler (like theSystem.Windows.Forms.Timer
component), than you are doing this in a different thread and the results are undefined. This is, most likely, the problem you're having. Now, if you mean the GIF is animated and yourPictureBox
isn't animating it, please post some additional code to help us understand how you're using the control. This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles]