472,989 Members | 3,161 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Animated GIFS

I am creating a small simulation in VB and wish to
incorporate several animated GIFS. I can load the GIFS
from the hard drive into a picture box and they animate,
but I have two questions.

1.) Some of the GIFS were designed to play once, but in
my VB application they loop continuously. What must I do
to make them play only once?

2.) When I build the solution for distribution, how do I
incorporate the GIFS in the distribution package and
reference them? My first pass program used an ImageList,
but the GIFS would not animate.

Here is the code that I'm using to load the GIFS and
display them in a pictureBox.

Dim dPic(7) As Image
Dim FStr As String = "C:\Documents\Visual Studio _
dPic(0) = Image.FromFile(FStr + "D1.gif")
dPic(1) = Image.FromFile(FStr + "D1S.gif.")
dPic(2) = Image.FromFile(FStr + "D2.gif")
dPic(3) = Image.FromFile(FStr + "D2S.gif")
dPic(4) = Image.FromFile(FStr + "D3.gif")
dPic(5) = Image.FromFile(FStr + "D3S.gif")
dPic(6) = Image.FromFile(FStr + "DDP.gif")
dPic(7) = Image.FromFile(FStr + "DWin.gif")
LoadPic(1, 0)
LoadPic(2, 2)
LoadPic(3, 4)

Sub LoadPic(ByVal Dx As Integer, ByVal i As Integer)
Select Case Dx
Case 1
pbD1.Image = dPic(i)
pbD1.Tag = i
Case 2
pbD2.Image = dPic(i)
pbD2.Tag = i
Case 3
pbD3.Image = dPic(i)
pbD3.Tag = i
End Select
End Sub

Thanks, in advance for your advice council and wisdom.
Nov 21 '05 #1
0 1733

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Shabam | last post by:
Does dot net support the resizing of animated GIFs? I've heard that it doesn't. Why is that, if it's true?
by: John J. Hughes II | last post by:
Is it possible using Image or Bitmap to build and save an animated GIF file? I am not have a problem saving the GIF file just getting the frames added to it. I did find ImageAnimator but it only...
by: Koen Hoorelbeke | last post by:
Hi there, I'm trying to read an animated gif from a url (for a banner-rotator). The code I have now, does read the gif (or jpg), but the result is that I only get the first frame of the animated...
by: Helmut Giese | last post by:
Hello out there, this is OT but maybe some of you were in the past faced with the same problem: I have lots of sequences of GIF files to combine into animated GIFs. I can do it 'by hand' with...
by: Scirious | last post by:
People, I need a way to detect the moment an animated GIF gets to it's end to switch to a different GIF. I can't use a Timer because the GIFs have different times and doing so (as I'm doing at the...
by: ZikO | last post by:
Hi. I am making a Multimedia Presentation in VB.NET 2005 and I have some animated GIFs which I need to use. I tried to use PictureBox for it but it doesn't play an animation in GIFs :/. What I...
by: Jeff | last post by:
Hi, I'd like to write Javascript that stops animated gifs from animating. On Firefox, at least, window.stop(); does the trick, although it stops everything on the page and is kind of...
by: Phil | last post by:
I thought it would be nice to display some animated GIFs on some of my forms. I put a PictureBox control on a form, and loaded my GIF file in. It animates, but not properly. It seems very jerky and...
by: helraizer1 | last post by:
Hey, I have a PHP script that I made for an image based shoutbox with emoticons. The problem is that php GD doesn't support animated gifs, yet perl GD does. How would I make it so that I could...
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

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.