Results 1 to 3 of 3

Thread: Animation

  1. #1
    Guest

    Post

    How do I put a simple animated .gif file into a VB 5 form? I am new to the language so I am not exactly sure what I am doing yet. Thanks

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

    Post

    Create a Form with a Picturebox, a WebBrowser Control within the Picturebox, a Command Button and a CommonDialog Control..
    Code:
    Private Sub Command1_Click()
        On Error GoTo UserCancelled
        With CommonDialog1
            .DialogTitle = "Select an Animated Gif.."
            .Filter = "GIFs|*.gif"
            .CancelError = True
            .ShowOpen
            WebBrowser1.Navigate .FileName
            WebBrowser1.Move -ScaleX(12, vbPixels, vbTwips), -ScaleY(20, vbPixels, vbTwips), Screen.Width, Screen.Height
            Picture1 = LoadPicture(.FileName)
            Picture1.AutoSize = True
        End With
    UserCancelled:
    End Sub
    ------------------
    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]

  3. #3
    Addicted Member
    Join Date
    Jan 1999
    Location
    Sydney,NSW,Australia
    Posts
    178

    Post

    Go to www.planet-source-code.com and do a search on animated gifs. There are at least two down loadable projects there which cover this exact topic.

    If you are new at vb then sign on for their daily info email.

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