473,439 Members | 1,709 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Animated GIG in VB6

How to get an animated GIF to function in V6

I have an animated dove that was too lazy to flap his wing when flying across the screen. Of course VB6 doesn't see animated GIF's, so got this one figured out by extracting the 15 individual GIF pictures and using the following routine he does fly across as I want him to do.

The trick is to save each picture as a "transparent" picture.

Option Explicit

Private Sub Timer3_Timer()
picAnimate.Top = 1 'set location from top of screen

'Static variables keep there value with each procedure call
Static currentpic As Integer

'Determines if the animation is at the last picture and starts
'at the beginning if so
If currentpic = 14 Then currentpic = -1

'moves to the next picture
currentpic = currentpic + 1

'moves the picture to the left
picAnimate.Left = picAnimate.Left + 55 'orig setting 400

'determines if image is off screen
'-3600's causes a slight delay in the animation coming back around
If (picAnimate.Left) > ScaleWidth Then picAnimate.Left = -1000 ' orig -3600

'changes the image to the new image
picAnimate.Picture = imgDove(currentpic).Picture

End Sub


Hope someone can use this
[mail id removed]
Nov 24 '07 #1
3 2692
lotus18
866 512MB
vb 6 cannot handle gif animation but in vb .net it can. You need an active x control for running gif files in vb 6.

click this link http://www.thescripts.com/forum/thre...animation.html
Nov 24 '07 #2
Mohan Krishna
115 100+
Hi everyone!
I tried in an different manner to animate, by getting some idea and some code from other sources.
But I don't know how to add the zip file here.
Nov 24 '07 #3
Mohan Krishna
115 100+
Hi everyone!
I tried in an different manner to animate, by getting some idea and some code from other sources.
Now I could manage to attach. My Project's ZIP is attached...
Attached Files
File Type: zip AnimExample.zip (6.2 KB, 299 views)
Nov 24 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: DOK | last post by:
I'm trying to create an eBay ad. So far, I've got the page the way I want it. However, the few animated gif's I have on the page display but are no longer animated. I can get it to work in...
9
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...
2
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...
10
by: Liz | last post by:
All: Can anyone tell me why my animated GIF does not show up as animated when put into a pictureBox?? Thanks. Liz
4
by: Al_C | last post by:
It's not that I expected it to work, but can anyone explane why if I put an animated gif as the background image of a form it is no longer animated? Is there any way to actually do that? Thanks,...
7
by: Gary Kaucher | last post by:
At the top of the page on my website http://www.itemlook.com I have an animated gif called "eyeline.gif". It has worked fine in the past, but recently I am unable to get it to work using IE6. All...
4
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...
7
by: Lemune | last post by:
Hi.. I am developing an application that connect to database on the other side of the net. And each time i want to connect to database and run some sql command, i want my user to know that there...
27
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...
0
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
1
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...
0
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...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...
0
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...

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.