PDA

Click to See Complete Forum and Search --> : Animation


Dec 9th, 1999, 12:25 AM
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

Aaron Young
Dec 9th, 1999, 01:58 AM
Create a Form with a Picturebox, a WebBrowser Control within the Picturebox, a Command Button and a CommonDialog Control..

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
aarony@redwingsoftware.com
adyoung@win.bright.net

jritchie
Dec 9th, 1999, 11:48 AM
Go to www.planet-source-code.com (http://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.