Results 1 to 3 of 3

Thread: Animated GIF images in VB

  1. #1
    Guest

    Post

    Is it possible to display animated GIF images, and if yes how?
    Thanks for your help

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

    Post

    You can use the webbrowser control, or check out www.codeguru.com/vb activex section (if I remember well...), there's a free ocx which can show animated gifs.

  3. #3
    Guest

    Post

    HI,
    I had the same question and posted it sometime back, may be 2 days back. There was one person by name Aaron answered my question. He had sent me a piece of code, which should help u also.

    The answer to my question was:

    Add a Picturebox to a Form, place a WebBrowser Control Within the Picturebox, add a CommonDialogbox Control..

    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

    u can avoid common dialog box, if u know filename with full path.

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