Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
 
 
 
500MB 27GB Web Hosting - $9.95/Month
 
 
 
 
 
Old Pages
 
Old Index
Site Map
What's New
 
Books
How To
Tips & Tricks
Tutorials
Stories
Performance
Essays
Links
Q & A
New in VB6
Free Stuff
Pictures
 
 
 
TitleAnimate a series of bitmaps stored in an ImageList
Keywordsanimation, bitmap, animate, multimedia
CategoriesMultimedia, Graphics
 
Store the frame images in an ImageList control. When a Timer fires, copy the next frame's image into a visible PictureBox. This program loops forward and backward through images 1 to 11.
 
Private Sub tmrNextFrame_Timer()
Static next_frame As Integer
Static d_frame As Integer

    If d_frame = 0 Then d_frame = 1
    next_frame = next_frame + d_frame
    If next_frame > imlFrames.ListImages.Count Then
        next_frame = imlFrames.ListImages.Count
        d_frame = -1
    ElseIf next_frame < 1 Then
        next_frame = 1
        d_frame = 1
    End If

    picScreen.Picture = _
        imlFrames.ListImages(next_frame).Picture
    DoEvents
End Sub
 
 
Copyright © 1997-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated