472,096 Members | 1,360 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,096 software developers and data experts.

Animated GIF in PictureBox Not Moving

Liz
All:

Can anyone tell me why my animated GIF does not show up
as animated when put into a pictureBox??

Thanks.
Liz
Nov 20 '05 #1
10 23039
* "Liz" <ch*********@earthlink.net> scripsit:
Can anyone tell me why my animated GIF does not show up
as animated when put into a pictureBox??


Who knows. Please provide some more details on the image.

Have a look at thge 'ImageAnimator' class too.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
Liz
It's a standard animated image. I've put it into a
picture box on my form. It happily animates while I'm in
design mode, but when I actually run the program I get
mixed results. Sometimes it animates correctly and
sometimes it's frozen. Note that I'm executing the same
piece of code over and over without change and I still
see the variable behavior in the image.

As for the ImageAnimator class, how would I incorporate
that with a PictureBox?

Thanks.
L.
-----Original Message-----
* "Liz" <ch*********@earthlink.net> scripsit:
Can anyone tell me why my animated GIF does not show up as animated when put into a pictureBox??
Who knows. Please provide some more details on the

image.
Have a look at thge 'ImageAnimator' class too.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
.

Nov 20 '05 #3
I just did a simple test using an animated GIF file and a picturebox
control. I loaded the gif in the Form Load event like so: PictureBox1.Image
= Image.FromFile("C:\checking.gif") and it works fine. Maybe, your problem
is you are setting the .Image source from Design Mode instead of doing it
from Form Load. Try setting the image source in code instead of in the Form
Designer and see if that fixes your problem.
james

"Liz" <ch*********@earthlink.net> wrote in message
news:fc****************************@phx.gbl...
It's a standard animated image. I've put it into a
picture box on my form. It happily animates while I'm in
design mode, but when I actually run the program I get
mixed results. Sometimes it animates correctly and
sometimes it's frozen. Note that I'm executing the same
piece of code over and over without change and I still
see the variable behavior in the image.

As for the ImageAnimator class, how would I incorporate
that with a PictureBox?

Thanks.
L.
-----Original Message-----
* "Liz" <ch*********@earthlink.net> scripsit:
Can anyone tell me why my animated GIF does not show up as animated when put into a pictureBox??


Who knows. Please provide some more details on the

image.

Have a look at thge 'ImageAnimator' class too.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
.

Nov 20 '05 #4
* "james" <jjames700ReMoVeMe at earthlink dot net> scripsit:
I just did a simple test using an animated GIF file and a picturebox
control. I loaded the gif in the Form Load event like so: PictureBox1.Image
= Image.FromFile("C:\checking.gif") and it works fine. Maybe, your problem
is you are setting the .Image source from Design Mode instead of doing it
from Form Load. Try setting the image source in code instead of in the Form
Designer and see if that fixes your problem.


That's an interesting point!

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #5
Let me suggest what is bound to be controversial :-) Rather than "suppose"
that setting it from design mode might not work why wouldn't a person simply
test out the theory? And having done that there would then be no reason to
post "maybe that's the problem" because it uhhh, won't be.

Computer software development clearly isn't a "science" yet.

(To the original poster) Consider creating a new project, drop a picturebox
onto a form and add your animated gif image. If that doesn't work (confirm
the thing is an animated gif) and if it is, post the image or place it on a
webpage where one of us can download it from.
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
* "james" <jjames700ReMoVeMe at earthlink dot net> scripsit:
I just did a simple test using an animated GIF file and a picturebox
control. I loaded the gif in the Form Load event like so: PictureBox1.Image = Image.FromFile("C:\checking.gif") and it works fine. Maybe, your problem is you are setting the .Image source from Design Mode instead of doing it from Form Load. Try setting the image source in code instead of in the Form Designer and see if that fixes your problem.


That's an interesting point!

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>

Nov 20 '05 #6
Tom,

* "Tom Leylan" <ge*@iamtiredofspam.com> scripsit:
Let me suggest what is bound to be controversial :-) Rather than "suppose"
that setting it from design mode might not work why wouldn't a person simply
test out the theory? And having done that there would then be no reason to
post "maybe that's the problem" because it uhhh, won't be.
When working with animated GIFs on my machine, I /never/ experienced the
problem the OP experienced. It's maybe a problem with the GIF file the
OP is using, so it IMO doesn't make much sense to play around with
another file.
onto a form and add your animated gif image. If that doesn't work (confirm
the thing is an animated gif) and if it is, post the image or place it on a
webpage where one of us can download it from.


Good idea!

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #7
To clarify... somebody posted "try to assign the image in code" which is
what I was writing about. If that person had attached the image in the
designer (as a test) then suggesting "maybe it has something to do with the
designer" wouldn't have been necessary. There would be no question that
there wasn't a problem.
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:um**************@TK2MSFTNGP11.phx.gbl...
Tom,

* "Tom Leylan" <ge*@iamtiredofspam.com> scripsit:
Let me suggest what is bound to be controversial :-) Rather than "suppose" that setting it from design mode might not work why wouldn't a person simply test out the theory? And having done that there would then be no reason to post "maybe that's the problem" because it uhhh, won't be.


When working with animated GIFs on my machine, I /never/ experienced the
problem the OP experienced. It's maybe a problem with the GIF file the
OP is using, so it IMO doesn't make much sense to play around with
another file.
onto a form and add your animated gif image. If that doesn't work (confirm the thing is an animated gif) and if it is, post the image or place it on a webpage where one of us can download it from.


Good idea!

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>

Nov 20 '05 #8
I posted "try to asign the image in code" because after trying it myself,
referencing an animated GIF from the Form Designer, the animation DID NOT
WORK. Referencing the animated GIF in Code
DID WORK. So, what makes you think there was no reason to suggest that
there might be a problem
with attaching the image to the picturebox thru the Form Designer? What, in
your opinion, is wrong with suggesting other solutions to someone when what
they have been trying does not work for them and when another person has
tried the same thing and it did not work for them either?
Or are you just being some sort of language police and complaining about my
form of writing and offering different other help? Did you not think my
statements were clear enough?
I simply offered the original poster another way to accomplish their goal
when the way they had tried first did not work and they came here and asked
for help.
Besides, if you had bothered to read what I posted, I gave a code example on
how to go about loading the animated gif into the picturebox control when
the form loaded.
james

"Tom Leylan" <ge*@iamtiredofspam.com> wrote in message
news:un**************@TK2MSFTNGP12.phx.gbl...
To clarify... somebody posted "try to assign the image in code" which is
what I was writing about. If that person had attached the image in the
designer (as a test) then suggesting "maybe it has something to do with the designer" wouldn't have been necessary. There would be no question that
there wasn't a problem.
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:um**************@TK2MSFTNGP11.phx.gbl...
Tom,

* "Tom Leylan" <ge*@iamtiredofspam.com> scripsit:
Let me suggest what is bound to be controversial :-) Rather than "suppose" that setting it from design mode might not work why wouldn't a person simply test out the theory? And having done that there would then be no
reason
to post "maybe that's the problem" because it uhhh, won't be.


When working with animated GIFs on my machine, I /never/ experienced the
problem the OP experienced. It's maybe a problem with the GIF file the
OP is using, so it IMO doesn't make much sense to play around with
another file.
onto a form and add your animated gif image. If that doesn't work (confirm the thing is an animated gif) and if it is, post the image or place it on a webpage where one of us can download it from.


Good idea!

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>


Nov 20 '05 #9
* "Tom Leylan" <ge*@iamtiredofspam.com> scripsit:
To clarify... somebody posted "try to assign the image in code" which is
what I was writing about. If that person had attached the image in the
designer (as a test) then suggesting "maybe it has something to do with the
designer" wouldn't have been necessary. There would be no question that
there wasn't a problem.


ACK. Maybe the person answering that read the thread about ImageLists +
Alpha channels where the designer converted the images to bitmaps
automatically.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #10
Clearly you don't bother to read before posting. I didn't "suppose", I
proved that there was a problem and provided code to show how to accomplish
what the OP wanted.
And READING before responding clearly isn't a "science" yet, either.
If the best YOU can do is criticize another person's wording of their
response to another person's request for help, then maybe, you should just
butt out.

james

"Tom Leylan" <ge*@iamtiredofspam.com> wrote in message
news:ep**************@TK2MSFTNGP09.phx.gbl...
Let me suggest what is bound to be controversial :-) Rather than "suppose" that setting it from design mode might not work why wouldn't a person simply test out the theory? And having done that there would then be no reason to post "maybe that's the problem" because it uhhh, won't be.

Computer software development clearly isn't a "science" yet.

(To the original poster) Consider creating a new project, drop a picturebox onto a form and add your animated gif image. If that doesn't work (confirm the thing is an animated gif) and if it is, post the image or place it on a webpage where one of us can download it from.
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
* "james" <jjames700ReMoVeMe at earthlink dot net> scripsit:
I just did a simple test using an animated GIF file and a picturebox
control. I loaded the gif in the Form Load event like so: PictureBox1.Image = Image.FromFile("C:\checking.gif") and it works fine. Maybe, your problem is you are setting the .Image source from Design Mode instead of doing it from Form Load. Try setting the image source in code instead of in
the
Form Designer and see if that fixes your problem.


That's an interesting point!

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>


Nov 20 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Michael Ramey | last post: by
reply views Thread by MrPickwick | last post: by
3 posts views Thread by Altman | last post: by
4 posts views Thread by Al_C | last post: by
2 posts views Thread by Svein Erik | last post: by
3 posts views Thread by ZikO | last post: by
7 posts views Thread by Lemune | last post: by
27 posts views Thread by Phil | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.