473,763 Members | 7,541 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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\V isual Studio _
Projects\ThreeD \bin\Gifs\"
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.
GrandpaB
Nov 21 '05 #1
0 1852

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

Similar topics

1
1526
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?
9
9718
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 seems to deal with showing the GIF and not saving it. Thanks, John
2
2265
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 gif, AND at a much lower quality :-( Important to note is that the image is read from a url (from a different server), and thus NOT from the local disk. Below is the code I use:
4
1940
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 Microsofts Gif Animator, but given the amount of files I have to process, a tool which can be controlled from the command line looks much more attractive. Googling led me to WhirlGif, and I got it compiled (Windows) - but it appears to not like my...
2
3550
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 moment) causes some of the images to change before ti gets to the end and other run more than one time. Do animated GIFs trigger any event I can use to detect when it finished executing? If not, is there a way to do it?
3
6218
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 should do to resolve this problem, do you have any suggestions? Regards.
4
6365
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 unpredictable. If I connect it to the onload event, sometimes only half the page will be displayed. Does the onload even fire before rendering? Does anyone know a reasonable way to accomplish my original goal of
27
14054
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 dwells on some frames longer than it should. Searching for this problem, I have found several people who have stated that animated GIFs don't work in a PictureBox at all, and you have to use the ImageAnimator. I assume they must be referring to...
0
1568
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 copy the animated gifs via Perl onto the static image that I made with php? I've tried with php imagecreatefromgif(), which produces a static image. I also tried using the GIFAnimation class from phpclasses to make an animated gif but it returns it as...
0
9563
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9386
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9997
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9937
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9822
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8821
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5270
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
3522
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.