Results 1 to 3 of 3

Thread: using an animated gif

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 1999
    Location
    Pembroke Dock, Pembrokeshire, Wales
    Posts
    10

    Post

    How can I run an animated gif in VB?

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,176

    Post

    You can use a Webbrowser control within a Picturebox to fake an Animated Gif box..

    Place a Webbrowser Control within a Picturebox, so the Picturebox is the Container, for this example also place a CommonDialogBox on the Form:
    Code:
    Private Sub Command1_Click()
        On Error GoTo Load_Cancel
        With CommonDialog1
            .CancelError = True
            .DialogTitle = "Open an Animated GIF"
            .Filter = "GIFS (*.GIF)|*.GIF"
            .ShowOpen
            WebBrowser1.Navigate .FileName
            WebBrowser1.Move ScaleX(-12, vbPixels, vbTwips), ScaleY(-19, vbPixels, vbTwips), Width, Height
            Picture1 = LoadPicture(.FileName)
            Picture1.AutoSize = True
        End With
    Load_Cancel:
    End Sub
    ------------------
    Aaron Young
    Analyst Programmer
    aarony@redwingsoftware.com
    adyoung@win.bright.net

  3. #3
    Hyperactive Member
    Join Date
    Jan 1999
    Location
    Rotterdam, Netherlands
    Posts
    386

    Post

    At www.codeguru.com/vb , ActiveX section, is a free ocx available for download to display animated gifs.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width