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
Printable View
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
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]
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.